Open up a shell instance editing /etc/fstab
:
$ sudo nano /etc/fstab
Inside the editor, append the following to create a new ramdisk. Adjust the 1024M
segment to whatever size you want your ramdisk to be.
tmpfs /tmp/ramdisk tmpfs noexec,defaults,noatime,size=1024M,x-gvfs-show,mode=1777 0 0
Next, initialize the ramdisk by running the following:
$ sudo mount -a
Inside a shell instance, type the following:
$ sudo nano /usr/lib/tmpfiles.d/intellij.conf
Inside the new buffer, append the following:
d /tmp/ramdisk/intellij/caches 0777 root root — -
d /tmp/ramdisk/intellij/index 0777 root root — -
Make sure no instance of IntelliJ IDEA is running when you run these commands
To get the configuration folder for your current install of IntelliJ IDEA, run the following in the shell:
$ cd ~/ && ls -la | grep .IntelliJ
Your output should look like the following:
drwxr-xr-x 4 keatonburleson keatonburleson 4096 Nov 7 13:00 .IntelliJIdea2019.2
This lets us know that we have our configuration stored in ~/.IntelliJIdea2019.2
Next, inside the shell, run the following (replacing .IntelliJIdea2019.2 with your version determined above):
$ ln -s /tmp/ramdisk/intellij/caches ~/.IntelliJIdea2019.2/system/caches
$ ln -s /tmp/ramdisk/intellij/index ~/.IntelliJIdea2019.2/system/index
You should be good to go!