A problem with this is that /tmp
isn't a tmpfs
mount by default on the current version of the OS (or on the last one or the one before that). Have a look at mount | grep tmp
.
Of course, you could link it to a directory in /run
instead. However, you'll have to arrange to have it created first, unless you just want to symlink it to /run
, which seems messy, and if all this is about saving the effort it takes to add a line to /etc/fstab
, silly as well.1
A more serious problem is that, particularly if the system runs without re-booting for a while and/or does stuff that creates copious logs, that tmpfs space isn't free -- it comes out of your RAM. Tmpsf mounts are intended for temporary storage of small amount of rapidly and frequently accessed runtime data, which logs are not.
- I won't repeat the paranoid-delusionally angle mentioned in my comment on your question, but don't forget about that either.