一、systemctl的简介
 systemctl是用于管理系统服务的命令行工具。systemctl命令可以启动、停止、重启或重新加载服务,并管理它们。
二、systemctl的参数说明
| 序号 | 参数 | 描述 | 
|---|---|---|
| 1 | start | 启动指定系统服务 | 
| 2 | stop | 停止指定系统服务 | 
| 3 | status | 显示指定系统服务的运行状态 | 
| 4 | daemon-reload | 重新加载Systemd守护进程(Daemon)的配置文件 | 
| 5 | enable | 在系统启动时自动启用(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 下载安装