Systemctl 命令

CentOS 7 开始 使用systemd来管理服务进程了

systemd是代替 init 作为父进程(PID=1)运行的
systemctl 是 Systemd 的主命令
也就是通过 systemctl 命令来代替之前的 /etc/init.d/ 来管理服务进程

查看 systemd 进程状态
pstree -p | grep systemd

服务控制
systemctl start *.service

开机运行
systemctl enable *.service
systemctl disable *.service

检测是否开机运行
systemctl is-enabled *.service

你可能感兴趣的:(Systemctl 命令)