Live2D

Linux命令记录-服务相关(二)

1.设置开机自启的服务
systemctl enable xxxx

2.启动服务
systemctl start xxxx/ service xxxx start

3.关闭服务
systemctl stop xxxx/ service xxxx stop

4.重启服务
systemctl restart xxxx/ service xxxx restart

5.重载服务
systemctl reload xxxx/ service xxxx reload

6.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体:
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed
查看服务运行状态: ps -ef | grep 程序名

posted @ 2020-09-06 16:02  AcmeZhang  阅读(129)  评论(0编辑  收藏  举报