下面是systemd相关命令:
列出当前活动默认目标
# systemctl get-default
列出所有活动系统目标:
# systemctl list-units --type target
列出所有可用的目标忽视其状态(Active,Innamic):
# systemctl list-units --type target -a
列出所有非活动系统目标:
# systemctl list-units --type target --state=inactive
列出与Systemd目标关联的所有已安装文件:
# systemctl list-unit-files --type target
更改默认目标,例如。
将默认目标
graphical.target
更改为
# systemctl set-default graphical.target
或者
# systemctl enable graphical.target --force
改变当前会话目标:
例如,将
graphical.target
更改为
# systemctl isolate graphical.target
更改为救援模式:
# systemctl rescue
更改为紧急模式:
# systemctl emergency
重启系统:
# systemctl isolate reboot.target
关机系统:
# systemctl isolate poweroff.target
日期:2020-07-07 20:54:59 来源:oir作者:oir