It always a good practice to disable reboot of your Linux servers using the shortcut keys “Ctrl-Alt-Delete”. There are some scenarios where someone physically access your Ubuntu and Debian servers and without logging into your server he/she can reboot it using the keys “Ctrl-Alt-Delete”. In case of virtual machines if any one get the console then it can also be rebooted via shortcut keys. So to avoid these conditions and accidental reboots, one should always disable reboot via shortcut keys “Ctrl-Alt-Delete”.
In this article we will demonstrate how to avoid accidental reboots via ‘Ctrl-Alt-Delete’ keys on Ubuntu and Debian Servers.
Below procedure is applicable for Ubuntu 16.04 LTS / Ubuntu 18.04 LTS & Debian 8 / Debian 9
Login to Your Ubuntu & Debian Servers , open the terminal and execute the following commands one after the another,
[email protected]:~$ sudo systemctl mask ctrl-alt-del.target Created symlink /etc/systemd/system/ctrl-alt-del.target → /dev/null. [email protected]:~$ sudo systemctl daemon-reload [email protected]:~$
Once the above commands are executed successfully then we can test whether our system is getting rebooted or not via shortcut keys “Ctrl-Alt-Delete”
Note: It is recommended to apply above procedure on Non-Production and test servers first, once it has been tested successfully then you can implement the same procedure on production servers.
That’s all from this tutorial, please do share your feedback and comments in the below comment section.