Stop Ubuntu / Debian Linux From Deleting /tmp Files on Boot

http‮s‬://www.lautturi.com
Stop Ubuntu / Debian Linux From Deleting /tmp Files on Boot

On a Debian-based Linux system, such as Ubuntu, the tmpfiles.d system is responsible for managing the files in the /tmp directory. By default, the tmpfiles.d system is configured to delete certain types of files in the /tmp directory on boot, in order to keep the directory clean and free of unnecessary files.

If you want to stop Ubuntu or Debian from deleting the files in the /tmp directory on boot, you can disable the tmpfiles.d system by editing the /etc/default/rcS file and setting the TMPTIME variable to 0. For example:

/etc/default/rcS:

TMPTIME=0

This will prevent the tmpfiles.d system from deleting any files in the /tmp directory on boot.

Keep in mind that disabling the tmpfiles.d system may have security implications, as it means that temporary files and directories may not be cleaned up regularly. It is generally a good idea to leave the tmpfiles.d system enabled and to clean up the /tmp directory manually if necessary.

Created Time:2017-10-30 14:27:20  Author:lautturi