Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debian Jessie shutdown on CTRL+ALT+DEL

For our Linux VM's in VirtualBox, we like to map CTRL+ALT+DEL to

shutdown -h now

The old way was editing the inittab file. How is this done now in Debian 8 with systemd?

like image 338
Eugene Barker Avatar asked Mar 16 '23 05:03

Eugene Barker


1 Answers

Just cd into /lib/systemd/system/ and change the symlink of ctrl-alt-del.target from reboot.target to poweroff.target.

ln -s /lib/systemd/system/poweroff.target /etc/systemd/system/ctrl-alt-del.target

then reset systemd daemon:

systemctl daemon-reload
like image 99
kevoroid Avatar answered Mar 18 '23 20:03

kevoroid