systemctl
systemctl | 输出已激活单元 |
---|---|
systemctl list-units | 输出已激活单元 |
systemctl --failed | 输出运行失败的单元 |
systemctl list-unit-files | 查看所有已安装服务 |
systemctl daemon-reload | 重新载入 systemd,扫描新的或有变动的单元 |
systemctl reboot | 重启 |
systemctl poweroff | 退出系统并停止电源 |
systemctl suspend | 待机 |
systemctl hibernate | 休眠 |
systemctl hybrid-sleep | 混合休眠模式(同时休眠到硬盘并待机 |
systemctl isolate graphical.target | 等价于telinit 3 或 telinit 5 |
管理服务实例
- systemctl start firewalld 启动firewalld
- systemctl stop firewalld 停止firewalld
- systemctl restart firewalld 重启firewalld
- systemctl reload firewalld 重新加载firewalld配置
- systemctl status firewalld 输出firewalld运行状态
- systemctl is-enabled firewalld 检查firewalld是否配置为自动启动
- systemctl enable firewalld 开机自动启动firewalld
- systemctl disable firewalld 取消开机自动启动firewalld
- systemctl help firewalld 显示firewalld的手册页