How to Disable Reboot using “Ctrl-Alt-Del” on Ubuntu / Debian Server

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”.

Disable-Reboot-Ctrl-Alt-Del-Ubuntu

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,

pkumar@linuxbuzz:~$ sudo systemctl mask ctrl-alt-del.target
Created symlink /etc/systemd/system/ctrl-alt-del.target → /dev/null.
pkumar@linuxbuzz:~$ sudo systemctl daemon-reload
pkumar@linuxbuzz:~$

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.

1 thought on “How to Disable Reboot using “Ctrl-Alt-Del” on Ubuntu / Debian Server”

  1. I am glad I could find this article, because my laptop is frozen sometimes. It is not a server, only a usual pc with Ubuntu 18.04, but it works anyway. After this process, as soon as I push ctrl-Alt-Del, I log out and I can “start with a clean sheet”. But Ctrl-alt-delete is not quite this in Windows: it makes it possible to choose wrong process, and I can keep all the others. Isn’t any possibility to do the same in Linux?

    Reply

Leave a Reply to Iván Bogárdi Cancel reply

nineteen − 14 =