Ubuntu关闭自动更新和GUI图形界面
目录
玩了一段时间Ubuntu之后发现很多操作还是用命令行更方便,GUI显得没太多作用,毕竟Ubuntu只在VM中,GUI有Windows或Mac就够了,所以想关掉GUI,同时也关掉烦人的自动更新。
一、关闭自动更新
临时关闭
sudo systemctl stop snapd.service
持久关闭
sudo systemctl stop snapd.service
sudo systemctl disable snapd.service
sudo systemctl mask snapd.service
重新开启
sudo systemctl unmask snapd.service
sudo systemctl reenable snapd.service
sudo systemctl start snapd.service
二、关闭GUI
临时关闭
sudo service lightdm stop
持久关闭
sudo systemctl set-default multi-user.target
持久开启(通过Ctrl+Alt+F7快捷键进入GUI界面)
sudo systemctl set-default graphical.target