学习老男孩Linux的笔记总结35【第95课】95-不断补充“开机启动实践”用法的笔记
1.查看开机启动项
[root@localhost ~]# chkconfig --list
[root@localhost ~]# chkconfig --list|grep 3:on
acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off
anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost ~]# chkconfig --list|grep vmware
vmware-tools 0:off 1:off 2:on 3:on 4:on 5:on 6:off
vmware-tools-thinprint 0:off 1:off 2:on 3:on 4:on 5:on 6:off
2.设置不同等级不同服务的启动项
[root@localhost ~]# chkconfig --list|grep rhnsd
rhnsd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@localhost ~]# chkconfig --level 3 rhnsd off
[root@localhost ~]# chkconfig --list|grep rhnsd
rhnsd 0:off 1:off 2:off 3:off 4:on 5:on 6:off
3.chkconfig和awk联合使用
[root@localhost ~]# chkconfig --list|awk '{print $1}'
NetworkManager
acpid
anacron
atd
浙公网安备 33010602011771号