Jump to Navigation

154 - To use tmpfs

This not a normal directory on your machine. It is intended to appear as a mounted file system, but one which uses virtual memory
instead of a persistent storage device. The standard /dev/shm grows automatically as more space is needed, but is by default limited
to half of your physical RAM. If you have 8GB, it can grow to 4GB at most.

So you can copy something to that place is in fact stored in your RAM. And that's smart because the  RAM is about 33 times faster than
a normal filesystem.  Please remember that after the system boot all files in it will be deleted.

To use it as a like normal directory :

$ mkdir /mnt/tmp
$ chmod 777 /mnt/tmp
$ mount -t tmpfs -o size=1000m /dev/shm /mnt/tmp



Main menu 2

Story | by Dr. Radut