ubuntu 18 安装后工作
1. 更换pip3镜像源
$ vi ~/.pip/pip.conf
加入:
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn
2. 升级软件
sudo apt update
sudo apt upgrade
3. Ubuntu清理系统垃圾
3.1 清理升级缓存以及无用包
sudo apt-get autoclean #清理旧版本的软件缓存
sudo apt-get clean #清理所有软件缓存
sudo apt-get autoremove #删除系统不再使用的孤立软件
3.2 清理opera firefox的缓存文件
ls ~/.opera/cache4
ls ~/.mozilla/firefox/*.default/Cache
3.3 清理Linux下孤立的包
图形界面下我们可以用:gtkorphan
sudo apt-get install gtkorphan -y
终端命令下我们可以用:deborphan
sudo apt-get install deborphan -y
3.4 卸载tracker
tracker不仅会产生大量的cache文件而且还会影响开机速度。
3.5 删除多余的内核
打开终端敲命令:
dpkg --get-selections|grep linux
有image的就是内核文件
删除老的内核文件:
sudo apt-get remove 内核文件名(例如:linux-image-2.6.27-2-generic)
uname -a
内核删除,释放空间了,应该能释放130-140M空间。
3.5 包管理的临时文件目录
包在
/var/cache/apt/archives
没有下载完的在
/var/cache/apt/archives/partial