You are not logged in.
Hi!
I'm used to shutting down my system with the "three finger salute" shortcut from the console. To use this under systemd, I have found (and use) the possibility of redirecting the /lib/systemd/system/ctrl-alt-del.target symlink from reboot.target to shutdown.target. However, systemd updates revert the symlink to its default.
Is there a way to prevent this? Did I miss the "right" way to configure the crtl-alt-del behaviour?
Maybe I'll post some context regarding my linux journey, in the newbie corner, if that could help. TL;DR is I have a hard time adjusting to systemd. For one thing, I can never remember / find again how to notify the whole thing when I change some config.
Last edited by illoult (2026-10-01 12:00:29)
Offline
/usr/lib is usually reserved for system level configuration but this should get trumped by "admin" configuration which lives in /etc so if you instead setup your symlink under /etc/systemd/system that should by loading inference override the system level configuration. Maybe also see: https://wiki.archlinux.org/title/Systemd#Targets and/or https://wiki.archlinux.org/title/System … unit_files (you're "technically" writing a unit file by adding symlinks to specific unit files and the very start of this section mentions the loading order)
As for systemd notification, if you use the tools like systemctl for making your changes instead of dancing around on the file level the relevant notifications will happen automatically. but if you're forced to make a change on the file level a systemctl daemon-reload will usually make the daemon aware of these changes
Last edited by V1del (2026-09-28 11:17:27)
Offline
Thank you for your time and answers! I'm still not sure how to proceed. But first, I need to stop confusing "halt" and "shutdown"! I'll try to stick to "poweroff" since that seems to be the preferred verb.
I manually reverted my modifications to /usr/lib/systemd, applied systemctl daemon-reload, checked with systemctl cat ctrl-alt-del.target that it's redirecting to reboot.target again.
Reading this from the systemd.unit man page:
Unit files may specify aliases through the Alias= directive in the [Install] section. When the unit is enabled, symlinks will be created for those names, and removed when the unit is disabled. For example, reboot.target specifies Alias=ctrl-alt-del.target, so when enabled, the symlink /etc/systemd/system/ctrl-alt-del.target pointing to the reboot.target file will be created, and when Ctrl+Alt+Del is invoked, systemd will look for ctrl-alt-del.target, follow the symlink to reboot.target, and execute reboot.service as part of that target. systemd does not look at the [Install] section at all during normal operation, so any directives in that section only have an effect through the symlinks created during enablement.
and seeing (again with systemctl cat) that reboot.target, poweroff.target and halt.target (but not shutdown.target) all provide the same alias, I get the feeling that I could simply disable reboot.target and enable poweroff.target. I'm wondering whether that would have other consequences. Or should I simply ln -s /usr/lib/systemd/system/poweroff.target /etc/systemd/system/ctrl-alt-del.target?
Offline
Sounds like that should work yeah. But yeah a direct symlink would more directly define what you actually want, but at the end of a day "enablement" is always a matter of creating the relevant symlinks.
Offline
I created that symlink manually, in /etc/systemd rather than in /usr/lib/systemd. Marking as solved.
Thx again!
Offline