摘要:
列出所有系统服务:systemctl list-units --all --type=service[root@localhost ~]# systemctl list-units...
列出所有系统服务:systemctl list-units --all --type=service
[root@localhost ~]# systemctl list-units --all --type=service
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
那么这些服务对应的启动脚本文件在哪里呢“? ll /usr/lib/systemd/system
[root@localhost ~]# ls /usr/lib/systemd/system
几个常用的服务相关的命令
systemctl enable crond.service //让服务开机启动
systemctl disable crond //不让开机启动
systemctl status crond //查看状态
systemctl stop crond //停止服务
systemctl start crond //启动服务
systemctl restart crond //重启服务
systemctl is-enabled crond //检查服务是否开机启动