Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do i create RAM drive under ubuntu. And would he automounted at startup?

share|improve this question
up vote 11 down vote accepted

Quote from

gksu gedit /etc/fstab

Add the following line to the bottom of the text file that opens but BE CAREFUL – do not touch, edit or enter ANYTHING else:

tmpfs  /media/ramdisk  tmpfs   defaults,noatime,mode=1777 0 0
share|improve this answer
Txh, it was very helpful =) – litvin05 Nov 7 '10 at 20:09
What or who are you quoting? – Marco Ceppi Nov 8 '10 at 14:39
dead link alert :) – Stefano Palazzo Jan 12 '11 at 8:24
It looks like the source was deleted / moved. But all the important stuff is written in the post above :) – Paweł Karpiński Jan 12 '11 at 8:30

I don't quite know what you mean with a RAM drive but if you mean more swapspace, you'll have to use a livecd with gparted, add a new swap partition, and then edit /etc/fstab to make the swap partition mount on boot.

Be careful, though, since making a mistake while editing fstab could have disastrous results and your system may not boot up anymore.

Also, you can mount two partitions under the same name, like swap.

share|improve this answer
It woul boot up, if backup fstab and if error occurred recover it with live cd =), but i mean a RAM-Drive, not swap or anything else. I want to take a lot of space from my RAM, and make it space as drive... – litvin05 Nov 7 '10 at 20:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.