方式一:
关闭图形界面
sudo systemctl set-default multi-user.target
sudo reboot
开启图形界面
sudo systemctl set-default graphical.target
sudo reboot
方式二:
关闭图形界面
sudo service lightdm stop
开启图形界面
sudo service lightdm start
sudo systemctl set-default multi-user.target
sudo reboot
sudo systemctl set-default graphical.target
sudo reboot
sudo service lightdm stop
sudo service lightdm start