The ctrlaltdel command is a utility in Linux that is used to send the “Control-Alt-Delete” key combination to the system. This key combination is used to reboot or shut down the system, depending on the system configuration.
To use the ctrlaltdel command, you will need to run it as the root user or with superuser privileges. This can be done by using the sudo command. For example, to reboot the system immediately without any preparation using the ctrlaltdel command, you can use the following command:
# sudo ctrlaltdel hard
This will send the “Control-Alt-Delete” key combination to the system, which will cause it to reboot.
If you encounter the below error while running the command ctrlaltdel:
ctrlaltdel: command not found
you may try installing the below package as per your choice of distribution:
Distribution | Command |
---|---|
Debian | apt-get install util-linux |
Ubuntu | apt-get install util-linux |
Alpine | apk add util-linux |
Arch Linux | pacman -S util-linux |
Kali Linux | apt-get install util-linux |
CentOS | yum install util-linux |
Fedora | dnf install util-linux |
OS X | brew install util-linux |
Raspbian | apt-get install util-linux |
ctrlaltdel Command Examples
1. Get current setting:
# ctrlaltdel
2. Set CTRL+ALT+DEL to reboot immediately, without any preparation:
# sudo ctrlaltdel hard
3. Set CTRL+ALT+DEL to reboot “normally”, giving processes a chance to exit first (send SIGINT to PID1):
# sudo ctrlaltdel soft