Friday, March 16, 2012

One Liner: Increase the Size of /tmp

The temporary space on /tmp may not be enough for some programs. The following command will re-size it to 2GB, without destroying any existing files:
mount -t tmpfs tmpfs /tmp -o size=2000M,mode=1777,remount

If you find yourself doing this often then you have at least two options:
  1. either add a suitable line for /tmp in /etc/fstab:
    none /tmp tmpfs size=2000M,mode=1777 0 0
  2. or avoid using tmpfs entirely, by modifying /etc/default/rcS like this:
    (not recommended: may impact both security and performance)
the changes will take effect after you reboot.

[02 Sep 2012] UPDATE: just noticed that RAMTMP=no is now the default setting, again, and that it is set in /etc/deafult/tmpfs

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.