您的位置:首页 > 运维架构 > Linux

如何查看和停止Linux启动的服务

2017-04-28 10:57 411 查看
SysV服务管理系统 例如 RedHat6等发行版

service --status-all 查看所有服务

service servicename status 查看指定服务状态

service servicename start|stop|restart 启动|停止|重启 指定服务

systemd服务管理系统 如CentOS 7等

systemctl is-enabled servicename.service #查询服务是否开机启动

systemctl enable *.service #开机运行服务

systemctl disable *.service #取消开机运行

systemctl start *.service #启动服务

systemctl stop *.service #停止服务

systemctl restart *.service #重启服务

systemctl reload *.service #重新加载服务配置文件

systemctl status *.service #查询服务运行状态

systemctl --failed #显示启动失败的服务
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: