Playing around with using ram-risk configurations lately I decided to attempt to store cache data my web browser (Firefox) in memory rather than on the conventional location (my hard-drive). So by following these simple steps I was able to accomplish just this, and here are the steps I took

  1. Create a location where you would like to mount your ramdisk. This can be done by using the following commands: sudo mkdir /<location> I used /media/firefox (sudo mkdir /media/firefox)
  2. Next is to mount the ramdisk with the following command: “sudo mount -t tmpfs -o size=64M,nr_inodes=10k,mode=0777 tmpfs /media/firefox”. I set the permissions to 777 which allows all users to access this location.
  3. I then open Firefox to configure the new cache location by: typing “about:config” in the browser address bar. Adding the following string to the configuration “browser.cache.disk.parent_directory” and setting the location to /media/firefox/
  4. Because I would like this change to be permanent I edit my system fstab configuration so that the ramdisk is auto mounted on each reboot. This is done by typing: “sudo nano /etc/fstab” and adding the following line: “ tmpfs /media/firefox tmpfs size=64M,nr_inodes=10k,mode=777 0 0”

Restart Firefox and all should just work. You can check if the ramdisk is in use by taking a look in the newly created ramdisk folder or typing the following command: “df -h” and you should see how much is used in the mount /media/firefox

There are many other uses for using a ramdisk, I hope this helps you and perhaps points you to many other good uses for that extra unused system ram.