Do I need to enable it this way? I am running Centos 7
systemctl enable systemd-tmpfiles-clean.service
What would be the implications?
Pin
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
How to enable systemd-tmpfiles-clean.service?
I run ‘systemctl enable systemd-tmpfiles-clean.service’ but with error:
The unit files have no [Install] section. They are not meant to be enabled using systemctl…
Pin
–clean: If this option is passed, all files and directories with an age parameter configured will be cleaned up.
May I know what is an ‘age parameter’?
systemd-tmpfiles-clean.service clears /tmp before shutdown. /tmp contains temporary files that some programs need, but do not expect them to be persisted across reboots.
In some cases, /tmp is mounted as a tmpfs filesystem which is stored entirely in RAM and is automatically cleared on reboot. However, that is not the case in the CentOS 7 image so you will need to enable systemd-tmpfiles-clean.service in order to have /tmp cleared on shutdown.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.