Linux+ Exam: How to Disable Ctrl+Alt+Del in Linux

Disable Ctrl+Alt+Del in Linux

Question

Which of the following configuration files should be modified to disable Ctrl+Alt+Del in Linux?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.

https://www.linuxtechi.com/disable-reboot-using-ctrl-alt-del-keys/

The correct answer is A. /etc/inittab.

The file /etc/inittab is the configuration file for the initialization process of Linux, which defines the default runlevel, services to be started, and actions to be taken when a particular event occurs. The Ctrl+Alt+Del key combination is one such event, which by default is configured to initiate a system reboot. However, it can be disabled by modifying the /etc/inittab file.

Here are the steps to disable Ctrl+Alt+Del in Linux:

  1. Open the /etc/inittab file using a text editor such as vi or nano.
bash
sudo vi /etc/inittab
  1. Look for the line that starts with "ca::ctrlaltdel" and comment it out by adding a '#' symbol at the beginning of the line.
javascript
#ca::ctrlaltdel:/sbin/shutdown -t3 -r now
  1. Save the changes and exit the text editor.

  2. Reboot the system or restart the init process for the changes to take effect.

csharp
sudo init q

After disabling Ctrl+Alt+Del, you can still reboot the system using the "shutdown" command or the "reboot" command, but not by pressing the Ctrl+Alt+Del key combination.

The other options provided in the question are incorrect:

  • B. ~/.bash_profile: This file contains user-specific settings for the Bash shell and does not control system-wide events such as Ctrl+Alt+Del.
  • C. /etc/securetty: This file contains a list of TTY devices that are considered secure for user login, and does not control system-wide events such as Ctrl+Alt+Del.
  • D. /etc/security/limits.conf: This file is used to set resource limits for user processes and does not control system-wide events such as Ctrl+Alt+Del.