服务管理工具 systemctl

Linux笔记本
494 0

查看服务级别

cd /lib/systemd/system
ls -l runlevel*.target

显示如下

lrwxrwxrwx 1 root root 15 Feb  5 12:32 runlevel0.target -> poweroff.target
lrwxrwxrwx 1 root root 13 Feb  5 12:32 runlevel1.target -> rescue.target
lrwxrwxrwx 1 root root 17 Feb  5 12:32 runlevel2.target -> multi-user.target
lrwxrwxrwx 1 root root 17 Feb  5 12:32 runlevel3.target -> multi-user.target
lrwxrwxrwx 1 root root 17 Feb  5 12:32 runlevel4.target -> multi-user.target
lrwxrwxrwx 1 root root 16 Feb  5 12:32 runlevel5.target -> graphical.target
lrwxrwxrwx 1 root root 13 Feb  5 12:32 runlevel6.target -> reboot.target

查看当前系统的运行级别
systemctl get-default

multi-user.target

设置下次重启后的启动级别
systemctl set-default graphical.target

最后更新 2020-05-18
评论 ( 0 )
评论已关闭