歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> CentOS7 systemctl的使用,centos7systemctl

CentOS7 systemctl的使用,centos7systemctl

日期:2017/3/6 9:34:30   编辑:學習Linux

CentOS7 systemctl的使用,centos7systemctl


CentOS7 systemctl的使用,centos7systemctl


# 查看正在運行的服務

systemctl

# 查看某個服務的狀態

systemctl status httpd.service

# 啟動服務

systemctl start foo.service

如:systemctl start httpd.service

# 停止服務

systemctl stop foo.service

如:systemctl stop httpd.service

# 重啟服務

systemctl restart foo.service

如:systemctl restart httpd.service

# 重新加載配置文件

systemctl reload foo.service

如:systemctl reload httpd.service

# 開機時啟動一個服務

systemctl enable foo.service

如:systemctl enable httpd.service

# 開機時關閉一個服務

systemctl disable foo.service

如:systemctl disable httpd.service

# 查看服務是否開機啟動

systemctl is-enabled foo.service

如:systemctl is-enabled httpd.service

http://xxxxxx/Linuxjc/1137735.html TechArticle

Copyright © Linux教程網 All Rights Reserved