命令 | 说明 |
/usr/lib/systemd/system | 查看服务的方法 |
systemctl start 服务名 | 开启服务 |
systemctl stop 服务名 | 关闭服务 |
systemctl restart 服务名 | 重新启动服务 |
systemctl status 服务名 | 查看服务状态 |
systemctl --type service | 查看正在运行的服务,按q退出,按entrl和空格翻页 |
systemctl list-unit-files | 查看所有服务器自启配置 |
systemctl disable 服务名 | 关掉指定服务的自动启动 |
systemctl enable 服务名 | 开启指定服务的自动启动 |
systemctl is-enabled 服务名 | 查看服务开机启动状态 |