How do we disable ctrl-alt-del on Ubuntu 16.04?
In the systemd world, CtrlAltDel is handled by ctrl-alt-del.target
:
ctrl-alt-del.target
systemd starts this target whenever Control+Alt+Del is pressed on
the console. Usually, this should be aliased (symlinked) to
reboot.target.
To disable this target, do:
systemctl mask ctrl-alt-del.target
systemctl daemon-reload
This does not completely disable CtrlAltDel. Systemd has a feature where pressing that key combination more than 7 times in 2 seconds triggers an immediate reboot. I'm not sure how to disable it, but I find it useful.
I don't think it can be disabled. From the systemd manpage:
SIGINT
Upon receiving this signal the systemd system manager will start the
ctrl-alt-del.target
unit. This is mostly equivalent tosystemctl start ctl-alt-del.target
. If this signal is received more than 7 times per 2s, an immediate reboot is triggered. Note that pressing Ctrl-Alt-Del on the console will trigger this signal. Hence, if a reboot is hanging, pressing Ctrl-Alt-Del more than 7 times in 2s is a relatively safe way to trigger an immediate reboot.systemd user managers treat this signal the same way as
SIGTERM
.