systemd服务管理--systemctl常用命令

时间:2022-05-02 03:38:05

转自 :https://m635674608.iteye.com/blog/2359480

1.

#systemctl enable crond.service //让某个服务开机启动(.service可以省略)

#systemctl disable crond.service //不让开机启动

#systemctl status crond.service //查看服务状态

#systemctl start crond.service //启动某个服务

#systemctl stop crond.service //停止某个服务

#systemctl restart crond.service //重启某个服务

#systemctl is-enabled crond //查看某个服务是否开机启动