1. Temporary switching
1. Shortcut keys
Ctrl+F4 #桌面切换成命令行
2. Command
init 5 #切换成桌面模式
init 3 #切换成命令行模式
Two, view the configuration file
cat /etc/inittab
3. View the current self-starting mode and switch commands
systemctl get-default #命令获取当前模式
systemctl set-default graphical.target #修改为图形界面启动
systemctl set-default multi-user.target #修改命令行启动