命令用于设置和检查系统服务.
语法:
chkconfig [--add][--del][--list][系统服务] 或 chkconfig [--level <等级代号>][系统服务][on/off/reset]
- —add : 增加所指定的系统服务, chkconfig可以管理, 在系统启动文件中增加相关数据.
示例:
chkconfig --list``` 注:该输出结果只显示 SysV 服务,并不包含 原生 systemd 服务。SysV 配置数据 可能被原生 systemd 配置覆盖。
要列出 systemd 服务,请执行 ‘systemctl list-unit-files’。 查看在具体 target 启用的服务请执行 ‘systemctl list-dependencies [target]’。
netconsole 0:关 1:关 2:关 3:关 4:关 5:关 6:关 network 0:关 1:关 2:开 3:开 4:开 5:开 6:关
2. 启动某服务
chkconfig service on ```
