CentOS 系统管理
时间:2017/12/30 15:18:04
参考:
系统服务启动管理 systemctl#
服务管理#
- 运行服务:
systemctl start service_name - 重启服务:
systemctl restart service_name - 重载服务:
systemctl reload service_name - 停止服务:
systemctl stop service_name - 开机启动:
systemctl enable service_name - 开机不启:
systemctl disable service_name - 注销服务:
systemctl mask service_name - 取消注销:
systemctl unmask service_name - 查看状态:
systemctl status service_name
服务查看#
- 查看所有系统服务:
systemctl - 查看所有启动 unit:
systemctl list-units - 查看所有启动文件:
systemctl list-unit-files - 列出所有service类型的util:
systemctl list-units –type=service –all - 列出 cpu相关 :
systemctl list-units –type=service –all grep cpu - 查看服务是否运行 :
systemctl is-active service_name - 查看服务是否开机启动:
systemctl is-enable service_name - 查看服务之间的依赖关系:
systemctl list-dependencies [unit] [–reverse]1 2
systemctl list-dependencies systemctl list-dependencies boot.mount