Rocky Linux 运维工具 systemctl

一、​​systemctl​的简介
​​systemctl​是用于管理系统服务的命令行工具。​systemctl​命令可以启动、停止、重启或重新加载服务,并管理它们。

二、systemctl​的参数说明

序号参数描述
1start启动指定系统服务
2stop停止指定系统服务
3status显示指定系统服务的运行状态
4daemon-reload重新加载Systemd守护进程(Daemon)的配置文件
5enable在系统启动时自动启用(enable)某个单元(unit)

三、systemctl的实战示例
1、start

###启动防火墙服务
[root@localhost ~]# systemctl start firewalld.service
###显示防火墙服务的运行状态
[root@localhost ~]# systemctl status firewalld.service

在这里插入图片描述

2、stop

###停止防火墙服务
[root@localhost ~]# systemctl stop firewalld.service
###显示防火墙服务的运行状态
[root@localhost ~]# systemctl status firewalld.service

在这里插入图片描述

3、systemctl status

###显示防火墙服务的运行状态
[root@localhost ~]# systemctl status firewalld.service

在这里插入图片描述

4、systemctl daemon-reload

###重新加载Systemd守护进程(Daemon)的配置文件
[root@localhost ~]# systemctl daemon-reload

在这里插入图片描述

5、systemctl enable

###设置nginx开机启动
[root@localhost ~]# systemctl enable nginx.service

在这里插入图片描述

四、扩展:
Rocky Linux系统安装
链接:VMware Workstation 下载安装(含秘钥)
链接:VMware Workstation 创建虚拟机
链接:Rocky_Linux 下载安装教程
链接:Rocky_Linux 网卡静态配置教程
链接:MobaXterm 下载安装

  • 6
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值