CentOS6.2禁止使用alt+ctrl+delete快捷鍵重啓服務器

咱們在管理的時候,爲了不誤操做ctrl+alt+del 引發系統的重啓,因此,咱們須要把這個功能註釋掉,在centos5.* 下,是在/etc/inittab這個文件中修改註釋掉就能夠了,因而乎在個人centos6.2下,我也這樣操做,可是打開這個文件。就傻眼了,啥都沒有啊:vim

# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:centos

 最後反覆仔細看了看文件內容和註釋,才發現圖中標註的那一行內容,原來,不是修改這個文件,是修改別的地方了:ide

#vim /etc/init/control-alt-delete.conf
#exec /sbin/shutdown -r now "Control-Alt-Delete pressed"this


 這個時候你再同時按下這個3個組合鍵,試試效果吧。。。spa

相關文章
相關標籤/搜索