方法一执行systemctl get-default 可以查看当前启动界面 root@fenglg-PC:/etc/pam.d# systemctl get-default
graphical.target
切换默认切换字符界面fenglg@fenglg-PC:~$ sudo systemctl set-default multi-user.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/multi-user.target.
确认修改结果出现如下软链接,说明修改成功Created symlink /etc/systemd/system/default.target → /lib/systemd/system/multi-user.target.
也可以执行systemctl get-default 查看 fenglg@fenglg-PC:/etc/systemd/system$ systemctl get-default
multi-user.target
修改为图形界面sudo systemctl set-default graphical.target
执行结果如下: fenglg@fenglg-PC:/etc/systemd/system$ sudo systemctl set-default graphical.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/graphical.target.
再次查看 fenglg@fenglg-PC:/etc/systemd/system$ systemctl get-default
graphical.target
每次切换后都可以再次重启,尝试登录切换后的界面,验证是否成功方法二可以手动创建软链接,如: sudo ln -svf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
|