一、最直接的方式
修改为默认图形化界面启动
[[email protected] system]# systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.
修改为默认多用户启动界面
[[email protected] system]# systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
二、比较复杂的方式
修改为默认图形化界面启动
[[email protected]~]# rm /etc/systemd/system/default.target
rm:remove symbolic link ‘/etc/systemd/system/default.target’? (这里需要敲回车确认)
[[email protected]~]# ln -sf /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target
修改为默认多用户启动界面
[[email protected]~]# rm /etc/systemd/system/default.target
rm:remove symbolic link ‘/etc/systemd/system/default.target’? (这里需要敲回车确认)
[[email protected]~]# ln -sf /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target