系统服务管理 chkconfig
# 查询出当前运行的服务
chkconfig --list
chkconfig --level 234 network off 关闭服务的启动级别
chkconfig --level 234 network on 开启服务的启动级别
chkconfig --del network 删除系统服务
chkconfig --add network 添加系统服务
系统服务管理 systemd
systemctl list-unit-files --type service --state enabled # 列出系统所有的服务
systemctl enable crond.service # 让某个服务开机启动(.service 可以省略)
systemctl disable crond.service # 设为开机不启动
systemctl status crond.service # 查看服务状态
systemctl start crond.service # 启动某个服务
systemctl stop crond.service # 停止某个服务
systemctl is-enabled crond # 查看某个服务是否开机启动
/usr/lib/systemd/system/crond.service 启动脚本的实际位置,启动的时候会创建一个软链接