栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

systemctl 管理服务命令

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

systemctl 管理服务命令

systemctl 服务管理命令,我们知道centos6版本之前 服务管理采用service命令,但在centos7版本后采用了全新的systemctl命令来管理系统服务,systemctl命令语法格式如下:

systemctl [选项] [服务名]

对管理服务来说,有以下最常用的参数:

start						:表示启动服务
restart						:表示重启服务
status						:表示查看服务状态
reload						:表示重新加载
stop						:表示停止服务
enable						:表示服务开机自启
disable						:表示禁止服务开机自启
list-unit-files				:列出系统所有已安装的服务单元
list-units [PATTERN...]     :列出当前内存中的服务单元 
get-default					:查看系统默认运行级别
set-default TARGET        	:设置系统默认运行级别
reboot						:重启
poweroff					:关机

演示示例:

[root@iflytek /]# systemctl  start firewalld.service	 
[root@iflytek /]# systemctl status firewalld.service
[root@iflytek /]# systemctl  restart firewalld.service	 
[root@iflytek /]# systemctl  reload firewalld.service	
[root@iflytek /]# systemctl  stop firewalld.service	 
[root@iflytek /]# systemctl  enable  firewalld.service	 
[root@iflytek /]# systemctl  disable firewalld.service	 
[root@iflytek /]# systemctl  list-unit-files
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/307843.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号