ubuntu recovery

開機時按shift進入recovery模式
選’Advanced options for Ubuntu and press’
指定想要使用的kernel image
選擇’drop to root shell prompt’

開機卡在Display Manager

sudo apt-get remove —purge nvidia-*
sudo apt-get install xdm
sudo dpkg-reconfigure lightdm
sudo apt-get purge gdm3
sudo apt-get install gdm3 ubuntu-desktop
sudo reboot

diskspace耗盡

du -sh /var/cache/apt/archives
sudo apt-get clean
sudo apt-get autoremove —purge

du -sk * |sort -nr |head -10
du -sh /var/tmp
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get autoclean