--//想在centos 7关闭按ctrl+alt+del重新启动服务器的功能,检查发现与centos 6不同。 --//链接:http://blog.itpub.net/267265/viewspace-2638238/ => [20190313]避免按ctrl+alt+del重新启动服务器.txt # ls -l /etc/systemd/system/ctrl-alt-del.target ls: cannot access /etc/systemd/system/ctrl-alt-del.target: No such file or directory # systemctl mask ctrl-alt-del.target Created symlink from /etc/systemd/system/ctrl-alt-del.target to /dev/null. # ls -l /etc/systemd/system/ctrl-alt-del.target lrwxrwxrwx. 1 root root 9 Mar 23 10:55 /etc/systemd/system/ctrl-alt-del.target -> /dev/null --//反转执行systemctl unmask ctrl-alt-del.target,实际上这样并不阻止按键,仅仅导致操作不会重启服务器。 --//在GUI下: # gsettings get org.gnome.settings-daemon.plugins.media-keys logout '<Control><Alt>Delete' Disabling for all users 1. Create a file under the directory '/etc/dconf/db/local.d/' with the settings to be applied globally. For example: # cat /etc/dconf/db/local.d/00-disable-CAD [org/gnome/settings-daemon/plugins/media-keys] logout='' 2. Update the dconf settings: # dconf update Verify if the 'ctrl-alt-del' key combination is disabled globally. # gsettings get org.gnome.settings-daemon.plugins.media-keys logout '' 完整实例:http://github.crmeb.net/u/defu
来自 “开源世界 ” ,链接:http://ym.baisou.ltd/post/631.html,如需转载,请注明出处,否则将追究法律责任。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。