Control-Alt-Delete is a combination keys, which initiates the soft reboot of servers; this must be disabled to avoid the un expected and unwanted reboot. In CentOS 6, Ctrl+Alt+Del was handled by inittab; now it is managed by systemd in CentOS 7. This guide will help you to disable Control-Alt-Del keys on CentOS 7.
Article will continue after the ad
Lets look at /etc/inittab file
# cat /etc/inittab
Content will look like below.
# inittab is no longer used when using systemd. # # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target # # systemd uses 'targets' instead of runlevels. By default, there are two main targets: # # multi-user.target: analogous to runlevel 3 # graphical.target: analogous to runlevel 5 # # To set a default target, run: # # ln -sf /lib/systemd/system/<target name>.target /etc/systemd/system/default.target #
From the above, inittab is no longer handles init function which includes Ctrl-Alt-Delete. Now we have to tell the systemd to disable it.
Use the following command to disable the Ctrl-Alt-Delete.
# ln -s /dev/null /etc/systemd/system/ctrl-alt-del.target