Super User is a question and answer site for computer enthusiasts and power users. 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 a true RAM disk? I don't want a virtual file system with loop devices, I would like a mountable filesystem that is stored completely in RAM.
I am using Fedora 17, linux 3.6.9-2.fc17.i686
Thanks in advance.

share|improve this question
1  
The real ramdisk is deprecated since it uses a fixed allocation, unlike ramfs and tmpfs. linuxfordevices.com/c/a/Linux-For-Devices-Articles/… – sawdust Dec 7 '12 at 3:10
up vote 3 down vote accepted

See the man page for more details.

Step 1:

mkdir -p /mnt/[some-name-or-other]

Step 2:

mount -t tmpfs -o size=1G tmpfs /mnt/[some-name-or-other]

Step 3:

Enjoy!

share|improve this answer

tmpfs should do the trick.

# mount -t tmpfs tmpfs /path/to/mount/point

# df -h
[...]
tmpfs                            12G     0   12G   0% /home/gert/tmpfs

It limits to 50% of your total RAM available by default (configurable - see 'Mount options for tmpfs' in the manpage mount(8)).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .