Which package is responsible to the filesystem of '/tmp' ?

Asked by johnmne

I'm looking for a package that should mount "/tmp" as tmpfs *by default* (in every Ubuntu installation).
This should be a default behavior in order to reduce HDD/SSD wear out and increase speed.

Many programs use "/tmp" for temporary files, for example Firefox downloads files to "/tmp" which could be fairly large, thus having "/tmp" as "tmpfs" helps.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

There is no package for it. It's a file system. It's a small section in RAM used to hold temporary stuff. It's nothing to do with any package in Ubuntu. Just like there isn't a package that provides the root of the file system. It's a portion of the permanent storage drive in your system....

Revision history for this message
johnmne (phi-reporter) said :
#2

@actionparsnip (andrew-woodhead666):

So who's responsible of the default mount options?
Where should I ask this feature?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

There are countless examples online... Have you not seen any?

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Look at https://askubuntu.com/questions/173094/how-can-i-use-ram-storage-for-the-tmp-directory-and-how-to-set-a-maximum-amount

The package systemd helps doing what you want.

Issue the commands
sudo cp /usr/share/systemd/tmp.mount /etc/systemd/system/tmp.mount
sudo systemctl enable tmp.mount
sudo systemctl start tmp.mount
and you will have your /tmp directory on a RAM disk.

I am not aware that a .deb package exists to automate these commands, but creating such package should be quite easy and straightforward.

Can you help with this problem?

Provide an answer of your own, or ask johnmne for more information if necessary.

To post a message you must log in.