查询服务是否开机启动
systemctl is-enabled servicename
开机运行服务
systemctl enable servicename
取消开机运行
systemctl disable servicename
停止服务
systemctl stop servicename
显示启动失败的服务
systemctl --failed
启动服务
systemctl start servicename
重启服务
systemctl restart servicename
重新加载配置文件
systemctl reload servicename
查看服务状态
systemctl status servicename
冻结服务
systemctl mask servicename
启用服务
systemctl unmask servicename
列出所有服务的状态
systemctl -a
列出当前系统服务状态
systemctl list-units
列出服务的状态
systemctl list-unit-files
列出服务的依赖关系
systemctl list-dependencies servicename
显示套接字文件
systemctl list-sockets
列出定时器
systemctl list-timers
查看服务的配置文件
systemctl cat servicename
查看环境变量
systemctl show-environment
查看系统引导时间
systemd-analyze time
显示每个进程消耗时间
systemd-analyze blame
图表查看
systemd-analyze plot