铁马冰河2000

导航

统计

Linux下使用systemctl命令

systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一起。

任务 旧指令 新指令
使某服务自动启动 chkconfig --level 3 httpd on
chkconfig --level 3 httpd on

来自: http://man.linuxde.net/systemctl
systemctl enable httpd.service
使某服务不自动启动 chkconfig --level 3 httpd off systemctl disable httpd.service
检查服务状态 service httpd status

systemctl status httpd.service (服务详细信息)

systemctl is-active httpd.service (仅显示是否 Active)

systemctl disable httpd.service

来自: http://man.linuxde.net/systemctl
显示所有已启动的服务 chkconfig --list systemctl list-unit-files|grep enabled
启动某服务 service httpd start systemctl start httpd.service
停止某服务 service httpd stop systemctl stop httpd.service
重启某服务  service httpd restar systemctl restart httpd.service

posted on   铁马冰河2000  阅读(56)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
点击右上角即可分享
微信分享提示