9. 9/56
点击这里 点击这里
- RHEL6
启动 service name start
停止 service name stop
重启 service name restart
状态 service name status
重载或重启服务(先加载,再启动) -
chkconfig命令的对应关系
点击这里 点击这里
- RHEL6
设定某服务开机自启 chkconfig name on
设定某服务开机禁止启动 chkconfig name off
查看所有服务的开机自启状态 chkconfig --list
用来列出该服务在哪些运行级别下启用和禁用 chkconfig sshd --list
查看服务是否开机自启 -
服务状态
[root@localhost ~]# systemctl list-unit-files --type service #显示状态
• loaded:Unit配置文件已处理
• active(running):一次或多次持续处理的运行
• active(exited):成功完成一次性的配置
• active(waiting):运行中,等待一个事件
• inactive:不运行
• enabled:开机启动
• disabled:开机不启动
• static:开机不启动,但可被另一个启用的服务激活