%general-entities; ]> Systemd Customization Systemd Customization Basic Configuration The /etc/systemd/system.conf file contains a set of items to control basic operations. The default file has all entries commented out with the default settings indicated. This file is where the log level may be changed as well as some basic journal settings. Disabling Screen Clearing at Boot Time The normal behavior for systemd is to clear the secreen at the end of the boot sequence. If desired, this behavior may be changed by the following: mkdir -p /etc/systemd/system/getty@tty1.service.d cat > /etc/systemd/system/getty@tty1.service.d/noclear.conf << EOF [Service] TTYVTDisallocate=no EOF The boot messages can always be revied by using the journalctl -b command as the root user. Disabling tmpfs for /tmp By default, /tmp is created as a tmpfs. If this is not desired, it can be overridden by the following: ln -s /dev/null /etc/systemd/system/tmp.mount This is not necessary if there is a separate partition for /tmp specified in /etc/fstab. Configuring Automatic File Creation and Deletion There are several services that create or delete files or directories: systemd-tmpfiles-clean.service systemd-tmpfiles-setup-dev.service systemd-tmpfiles-setup.service The system location for the configuration files is /usr/lib/tmpfiles.d/*.conf. The local configuration files are in /etc/tmpfiles.d/*.conf. Files in /etc/tmpfiles.d override files with the same name in /usr/lib/tmpfiles.d. See man tmpfiles.d for file format details. Adding Custom Units and Services A custom service can be added by creating a directory and configuration file in /etc/systemd/system/. For example: mkdir -p /etc/systemd/system/foobar.service.d cat > /etc/systemd/system/foobar.service.d/foobar.conf << EOF [Service] Restart=always RestartSec=30 EOF See the man page for systemd.unit for more information. After creating the configuration file, run systemctl daemon-reload and systemctl restart foobar to activate a service or changes to a service. Debugging the Boot Sequence There are several commands that can be used to help debug the systemd boot process. Here are some examples: systemctl list-units -t service [--all] systemctl list-units -t target [--all] systemctl show -p Wants multi-user.target systemctl status sshd.service