Tmp.mount options in Rocky 8

What are the advantages to using the systemd tmp.mount unit for using a tmpfs for /tmp as opposed to just doing it the old way in /etc/fstab? By default, tmp.mount will allow 50% of RAM as a size limit, and it appears that I have to fiddle with systemd overrides to change that. Why would that be better than just adding a line in /etc/fstab:

tmpfs /tmp tmpfs size=2g 0 0

Apparently that is also one way of overriding the systemd size limit, but then why bother with the systemd tmp.mount unit at all?

1 Like