/tmp and /var/tmp in Ubuntu

Nick Rosbrook nick.rosbrook at canonical.com
Wed May 21 14:42:27 UTC 2025


On Wed, May 21, 2025 at 10:29 AM Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Hello Nick,
>
> Mounting /tmp as tmpfs makes sense on systems that are not very memory constrained. I have been using this for the last years on all my systems.
>
> I am wondering which mount option shall be used. I have tended to mount with nosuid,nodev. But there are some rare use cases, e.g. with chroots where this runs into issues.
>

Taken from /usr/lib/systemd/system/tmp.mount:

Options=mode=1777,strictatime,nosuid,nodev,size=50%%,nr_inodes=1m

So yes, nosuid and nodev are used by default.

-Nick



More information about the ubuntu-devel mailing list