Move /tmp to RAM

view story

http://unix.stackexchange.com – I am trying to move /tmp to RAM and obey good practice: /var/tmp should NOT be placed in tmpfs, as it must survive reboots not mount /tmp as a stand-alone tmpfs, but rely on /dev/shm or /run/shm However, things have changed between 2.6 and 3.2 kernels : Changes to the configuration and defaults of tmpfs filesystems On 3.2 kernel, use RAMTMP=yes in /etc/default/tmpfs. My question is: how can I achieve this goal with older kernels ? Is there something like RAMTMP? Or is the right solution something like: mkdir /dev/shm/tmp chmod 1777 /dev/shm/tmp mount --bind /dev/shm/tmp /tmp (HowTos)