systemctl 用于管理不同的服务,类似于6版本的service
Meth:
systemctl status/start/restart/stop/reload/enable/disable service_daemons(守护进程)
Restart 重新重启后,进程的PID号改变
Reload 重新加载,进程的PID号不会改变
MASK 重启后完全disable 服务
systemctl mask sshd
解除:必须用unmask start,restart,reload等无效。
查看所有的active state服务。可用于查看守护进程名
systemctl list-units --type=service --all
查看所有的enable和disable状态。
systemctl list-unit-files --type=service
当服务停止时,仍处于激活状态,查看服务dependencies.
systemctl list-dependencies service_name
创作不易,欢迎点赞或者关注收藏,你每一次的点赞和收藏都是作者的动力,内容如有问题请私信随时联系作者,谢谢!