centos7怎能开机设置文本界面

时间:2021-05-30 07:19:05
rm -f /etc/systemd/system/default.target

设置命令行级别方法:
ln -sf /lib/systemd/system/runlevel3.target /etc/systemd/system/default.target

ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

systemctl set-default multi-user.target 改回窗口级别方法:
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target

ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

systemctl set-default graphical.target