Tuesday, 26 January 2016

Re: RFC on Cloud Images: Make /tmp a tmpfs

Robie Basak [2016-01-25 19:25 +0000]:
> 1) Make the option available but non-default on cloud images.
> 2) Make the option available and default on cloud images (so opt-out).

As for "making available": you can append "none /tmp tmpfs defaults 0 0"
to /etc/fstab, as already mentioned. But if modifying fstab is
impractical/unsafe for some reason, the following also works:

systemctl link /usr/share/systemd/tmp.mount

which is just a glorified way of doing

ln -s /usr/share/systemd/tmp.mount /etc/systemd/system/tmp.mount

Conversely, disabling this would just be

systemctl disable tmp.mount


rm -f /etc/systemd/system/tmp.mount

Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)