更新环境

sudo apt update
sudo apt upgrade

安装桌面

sudo apt install tasksel
sudo tasksel install ubuntu-desktop

关闭桌面

sudo systemctl set-default multi-user.target
sudo reboot

开启桌面

sudo systemctl set-default graphical.target
sudo reboot

卸载桌面

sudo apt-get remove gnome-shell
sudo apt-get remove gnome
sudo apt-get autoremove
sudo apt-get purge gnome
sudo apt-get autoclean
sudo apt-get clean