centos关闭ctrl+alt+del重启

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos关闭ctrl+alt+del重启相关的知识,希望对你有一定的参考价值。

cat /etc/inittab 

# inittab is no longer used when using systemd.

#

# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.

#

# Ctrl-Alt-Delete is handled by /usr/lib/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 view current default target, run:

# systemctl get-default

#

# To set a default target, run:

# systemctl set-default TARGET.target


ll /usr/lib/systemd/system/ctrl-alt-del.target

lrwxrwxrwx. 1 root root 13 Apr 12 23:42 /usr/lib/systemd/system/ctrl-alt-del.target -> reboot.target


rm /usr/lib/systemd/system/ctrl-alt-del.target 


init q


如需开启则重新创建链接,再次执行init q重新reload配置文件即可。

以上是关于centos关闭ctrl+alt+del重启的主要内容,如果未能解决你的问题,请参考以下文章

centos7 取消Ctrl+Alt+Del重启功能

linux系统初始化--​关闭Ctrl+Alt+Del自动重启的操作关联

一天一命令-系统关机和重启

Windows Server 2016 - 关闭 按Ctrl+Alt+Del才能登录

centos6centos7基本优化

禁用Linux下ctrl+alt+del操作系统参数