Linux之chkconfig工具

温馨提示:文章已超过2279天没有更新,可能存在链接失效,相关教程仅供参考

[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


© 除非注明,否则均为阿豪运维笔记原创文章,转载或复制请以超链接形式并注明出处

取消
微信二维码
微信二维码
支付宝二维码