Linux中修改系统服务的命令是chkconfig (check config),命令的详细解释如下:
chkconfig
功能说明:检查,设置系统的各种服务。
语 法:chkconfig?[--add][--del][--list][系统服务]?或?chkconfig?[--level?<等级代号>][系统服务][on/off/reset]
补充说明:这是Red?Hat公司遵循GPL规则所开发的程序,它可查询操作系统在每一个执行等级中会执行哪些系统服务,其中包括各类常驻服务。
参 数:
--add? 增加所指定的系统服务,让chkconfig指令得以管理它,并同时在系统启动的叙述文件内增加相关数据。?
--del? 删除所指定的系统服务,不再由chkconfig指令管理,并同时在系统启动的叙述文件内删除相关数据。?
--level<等级代号>? 指定读系统服务要在哪一个执行等级中开启或关毕?
功能说明:检查,设置系统的各种服务。
语 法:chkconfig?[--add][--del][--list][系统服务]?或?chkconfig?[--level?<等级代号>][系统服务][on/off/reset]
补充说明:这是Red?Hat公司遵循GPL规则所开发的程序,它可查询操作系统在每一个执行等级中会执行哪些系统服务,其中包括各类常驻服务。
参 数:
--add? 增加所指定的系统服务,让chkconfig指令得以管理它,并同时在系统启动的叙述文件内增加相关数据。?
--del? 删除所指定的系统服务,不再由chkconfig指令管理,并同时在系统启动的叙述文件内删除相关数据。?
--level<等级代号>? 指定读系统服务要在哪一个执行等级中开启或关毕?
首先来执行 chkconfig --list命令来查看所有已添加的系统服务(下面的结果只是一部分)
[root@fd?init.d]#?chkconfig?--list
diskdump????????0:off???1:off???2:off???3:off???4:off???5:off???6:off
xfs?????????????0:off???1:off???2:on????3:on????4:on????5:on????6:off
rhnsd???????????0:off???1:off???2:off???3:on????4:on????5:on????6:off
cups-config-daemon??????0:off???1:off???2:off???3:on????4:on????5:on????6:off
netfs???????????0:off???1:off???2:off???3:on????4:on????5:on????6:off
nfs?????????????0:off???1:off???2:off???3:off???4:off???5:off???6:off
microcode_ctl???0:off???1:off???2:on????3:on????4:on????5:on????6:off
netplugd????????0:off???1:off???2:off???3:off???4:off???5:off???6:off
netdump?????????0:off???1:off???2:off???3:off???4:off???5:off???6:off
cpuspeed????????0:off???1:on????2:on????3:on????4:on????5:on????6:off
syslog??????????0:off???1:off???2:o
diskdump????????0:off???1:off???2:off???3:off???4:off???5:off???6:off
xfs?????????????0:off???1:off???2:on????3:on????4:on????5:on????6:off
rhnsd???????????0:off???1:off???2:off???3:on????4:on????5:on????6:off
cups-config-daemon??????0:off???1:off???2:off???3:on????4:on????5:on????6:off
netfs???????????0:off???1:off???2:off???3:on????4:on????5:on????6:off
nfs?????????????0:off???1:off???2:off???3:off???4:off???5:off???6:off
microcode_ctl???0:off???1:off???2:on????3:on????4:on????5:on????6:off
netplugd????????0:off???1:off???2:off???3:off???4:off???5:off???6:off
netdump?????????0:off???1:off???2:off???3:off???4:off???5:off???6:off
cpuspeed????????0:off???1:on????2:on????3:on????4:on????5:on????6:off
syslog??????????0:off???1:off???2:o