cd 
vi .bashrc 
# 在最后添加
alias shutdown='echo '\''Please contact the root'\'''
alias reboot='echo '\''Please contact the root'\'''
alias init='echo '\''Please contact the root'\'''
alias halt='echo '\''Please contact the root'\'''
alias poweroff='echo '\''Please contact the root'\'''

禁止root用户无意使用关机命令

效果如下

禁止root用户无意使用关机命令

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2021-08-05
  • 2021-11-29
相关资源
相似解决方案