CentOS7配置默认启动为图形界面
一、最直接的方式
修改为默认图形化界面启动
[root@localhost 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.
修改为默认多用户启动界面
[root@localhost 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.
二、比较复杂的方式
修改为默认图形化界面启动
[root@virtual01~]# rm /etc/systemd/system/default.target
rm:remove symbolic link ‘/etc/systemd/system/default.target’? (这里需要敲回车确认)
[root@virtual01~]# ln -sf /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target
修改为默认多用户启动界面
[root@virtual01~]# rm /etc/systemd/system/default.target
rm:remove symbolic link ‘/etc/systemd/system/default.target’? (这里需要敲回车确认)
[root@virtual01~]# ln -sf /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target
|