安装VMware及创建RHEL8虚拟机;
服务的启动、重启、停止、重载、查看状态等常用命令新旧对比
| 老系统命令 | 新系统命令 | 作用 |
| service foo start | systemctl start httpd | 启动服务 |
| service foo restart | systemctl restart httpd | 重启服务 |
| service foo stop | systemctl stop httpd | 停止服务 |
| service foo reload | systemctl reload httpd | 重新加载配置文件(不终止服务) |
| service foo status | systemctl status httpd | 查看服务状态 |
服务开机启动、不启动、查看各级别下服务启动状态等常用命令新旧对比
| 老系统命令 | 新系统命令 | 作用 |
| chkconfig foo on | systemctl enable httpd | 开机自动启动 |
| chkconfig foo off | systemctl disable httpd | 开机不自动启动 |
| chkconfig foo | systemctl is-enabled httpd | 查看特定服务是否为开机自启动 |
| chkconfig --list | systemctl list-unit-files --type=httpd | 查看各个级别下服务的启动与禁用情况 |
需要背诵命令
systemctl start 服务名称 启动
systemctl stop 服务名称 停止
systemctl restart 服务名称 重启
systemctl enable 服务名称 加入启动项
systemctl status 服务名称 查看状态
shell bash
命令 参数 对象
长短格式日常使用情况
长格式
短格式
长格式和长格式不能合并
短格式和长格式不能合并



