Sunday, October 15, 2006

Disable Linux Reboot On CTRL+ALT+DEL

Don't ever press CTRL+ALT+DEL key combination in a Linux server!

Windows guys used to press CTRL+ALT+DEL key combination follow by ENTER key to immediately lock the server running on Windows 2000 or Windows XP and above when they leave the server.

What is the default behaviour when pressing CTRL+ALT+DEL key combination in a Linux machine? Well, the default action of Linux in responding to CTRL+ALT+DEL key combination is to reboot the Linux machine immediately! Just press it once, not twice as in Windows Me, and Linux will not be kind to ask confirmation before it really rebooting itself!

Anyway, this Linux default behaviour in responding to CTRL+ALT+DEL key combination pressed could be tweaked, indeed. Edit the /etc/inittab system file, look for the line containing ctrlaltdel keyword, and then either

  1. Remark the line ca::ctrlaltdel:/sbin/shutdown -t3 -r now to disable Linux from responding to the CTRL+ALT+DEL key combination


  2. Replace the /sbin/shutdown -t3 -r now with something else, such as

    dialog --clear --title "Information" --msgbox "Don't press CTRL+ALT+DEL key combination in Linux machine.\n\nTo reboot server, use init 6 or init 0 to shutdown Linux." 10 40;clear

    which use the dialog box command to alert users with a text-based GUI information dialog box.
Impress Linux users with text-based GUI dialog box control.

Related information:
  • The dialog box command is not a standard program installed by most Linux distribution. Find the dialog package from respective Linux distribution and install it.
  • Search more related info with Google Search engine built-in

This article has no comments yet. Why don't write your comments for this article?