LinuxCommandLibrary

ctrlaltdel

Reboot the system (often indirectly)

TLDR

Get current setting

$ ctrlaltdel
copy

Set CTRL+ALT+DEL to reboot immediately, without any preparation
$ sudo ctrlaltdel hard
copy

Set CTRL+ALT+DEL to reboot "normally", giving processes a chance to exit first (send SIGINT to PID1)
$ sudo ctrlaltdel soft
copy

SYNOPSIS

sysctl kernel.ctrl-alt-del=<value>
echo <value> | sudo tee /proc/sys/kernel/ctrl-alt-del

PARAMETERS

0
    Disable: ignore Ctrl+Alt+Del sequence

1
    Enable: send SIGINT to init (reboot/shutdown)

DESCRIPTION

The Linux kernel's ctrlaltdel feature defines the system's response to the Ctrl+Alt+Del key combination, originally popularized by MS-DOS. When enabled, pressing Ctrl+Alt+Del sends a SIGINT signal to the init process (PID 1), allowing for a clean shutdown or reboot depending on the init system's configuration.

Configuration is managed via the /proc/sys/kernel/ctrl-alt-del pseudo-file or the sysctl command. A value of 0 disables the feature, ignoring the key sequence entirely. A value of 1 (default in many kernels) activates it, trapping the sequence and passing it to init.

In traditional SysV init systems, this typically triggers an immediate reboot. Modern systems using systemd handle it via systemd-logind, which can be customized in /etc/systemd/logind.conf (e.g., HandlePowerKey=ignore). Physical console access is required, making it irrelevant for headless servers.

This mechanism provides a hardware-level emergency reboot option but poses security risks in shared environments.

CAVEATS

Enabling risks abrupt reboots by anyone with console access; disable on production multiuser systems. Systemd may override kernel behavior. Not applicable to SSH/remote sessions.

EXAMPLES

Disable: sudo sysctl kernel.ctrl-alt-del=0
Enable: echo 1 | sudo tee /proc/sys/kernel/ctrl-alt-del
Persist: Add kernel.ctrl-alt-del=0 to /etc/sysctl.conf and run sysctl -p

SYSTEMD NOTE

In systemd, edit /etc/systemd/logind.conf: HandleCtrlAltDel=ignore then systemctl restart systemd-logind

HISTORY

Introduced in early Linux kernels (1990s) to mimic MS-DOS Ctrl+Alt+Del reboot. Evolved with init systems; systemd-logind (2010+) added layered handling for power keys.

SEE ALSO

sysctl(8), proc(5), systemd-logind(8), reboot(8)

Copied to clipboard