chkcongfig 查看开机自启动服务的命令

LANG=en

for yxw in

`chkconfig --list |grep "5:on"|grep -Ev "sshd|crond"|awk "{print $1}"`;

do chkconfig $yxw off 5;    ///5指应用级别

done

 

 

chkconfig --list  sshd 

chkconfig --level  3  sshd  on  开启运行级别3的sshd服务

chkconfig --level  245  sshd  off

 

 -r  内容自动转义   其中上方的(.*)代表任意字符串, \1  表示匹配前面的(.*)

posted @ 2019-02-25 16:26  todayORtomorrow  阅读(249)  评论(0编辑  收藏  举报