下载后可任意编辑Ubuntu 命令大全 Ubuntu 技巧http://blog
cn/s/blog_4dd475390100bkd0
html查看软件 xxx 安装内容#dpkg -L xxx查找软件#apt-cache search 正则表达式查找文件属于哪个包#dpkg -S filename apt-file search filename查询软件 xxx 依赖哪些包#apt-cache depends xxx查询软件 xxx 被哪些包依赖#apt-cache rdepends xxx增加一个光盘源#sudo apt-cdrom add系统升级#sudo apt-get update#sudo apt-get upgrade#sudo apt-get dist-upgrade清除所以删除包的残余配置文件#dpkg -l |grep ^rc|awk ‘{print $2}’ |tr [”\n”] [” “]|sudo xargs dpkg -P -编译时缺少 h 文件的自动处理#sudo auto-apt run
/configure查看安装软件时下载包的临时存放目录#ls /var/cache/apt/archives备份当前系统安装的所有包的列表#dpkg –get-selections | grep -v deinstall > ~/somefile从上面备份的安装包的列表文件恢复所有包#dpkg –set-selections < ~/somefile sudo dselect下载后可任意编辑清理旧版本的软件缓存#sudo apt-get autoclean清理所有软件缓存#sudo apt-get clean删除系统不再使用的孤立软件#sudo apt-get autoremove查看包在服务器上面的地址#apt-get -qq –pri