csystemctl
csystemctl
systemctl命令是service和chkconfig命令的组合体,可用于管理系统。
输出系统中各个服务的状态:
systemctl list-units --type=service
查看服务的运行状态:
systemctl status rsyslog
关闭服务:
systemctl stop rsyslog
启动服务:
systemctl start rsyslog
重新启动服务(不管当前服务是启动还是关闭):
systemctl restart rsyslog
重新载入配置信息而不中断服务:
systemctl reload rsyslog
禁止服务开机自启动:
systemctl disable rsyslog
设置服务开机自启动:
systemctl enable rsyslog