systemctl
systemctl 命令 - 系统服务管理工具
系统服务管理工具
命令语法
systemctl [命令] [服务]
常用参数
| start | 启动服务 |
| stop | 停止服务 |
| restart | 重启服务 |
| status | 查看服务状态 |
| enable | 设置开机自启 |
实战示例
- $ systemctl status nginx查看nginx服务状态
- $ systemctl restart apache2重启apache2服务