Linux之chkconfig工具
温馨提示:这篇文章已超过895天没有更新,请注意相关的内容是否还可用!
[root@localhost ~]# chkconfig --list
列出服务和每个级别的开启状态
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
6为重启级别,2表示无nfs支持多用级别,3表示完全多用户模式,4保留给自定义用户,5表示图形登入级别
/etc/init.d/ 启动脚本是放在这个目录的
chkconfig network off关闭, chkconfig network off开启
# chkconfig --level 3 network off
指定某个级别是开启还是关闭
# chkconfig --level 345 network off
删除一个服务
# chkconfig --del network
设置开机启动一个服务
# chkconfig --add network