前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >systemctl管理服务的相关命令

systemctl管理服务的相关命令

作者头像
菲宇
发布2022-12-02 14:21:35
3620
发布2022-12-02 14:21:35
举报
文章被收录于专栏:菲宇

systemctl管理服务的启动、重启、停止、重载、查看状态的命令:

Sysvinit命令(红帽RHEL6系统)

Systemctl命令(红帽RHEL7系统)

作用

service foo start

systemctl start foo.service

启动服务

service foo restart

systemctl restart foo.service

重启服务

service foo stop

systemctl stop foo.service

停止服务

service foo reload

systemctl reload foo.service

重新加载配置文件(不终止服务)

service foo status

systemctl status foo.service

查看服务状态

systemctl设置服务的开机启动、不启动、查看各级别下服务启动状态的命令:

Sysvinit命令(红帽RHEL6系统)

Systemctl命令(红帽RHEL7系统)

作用

chkconfig foo on

systemctl enable foo.service

开机自动启动

chkconfig foo off

systemctl disable foo.service

开机不自动启动

chkconfig foo

systemctl is-enabled foo.service

查看特定服务是否为开机自启动

chkconfig --list

systemctl list-unit-files --type=service

查看各个级别下服务的启动与禁用情况

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2017-07-25,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档