Ubuntu 命令技巧(3)
发布时间:2013-06-24 来源:未知
=== 备份当前系统安装的所有包的列表 ===
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 --print-uris install ssh | cut -d\' -f2
== 系统 ==
=== 查看内核 ===
uname -a
=== 查看Ubuntu版本 ===
cat /etc/issue
或者
lsb_release -a
=== 查看内核加载的模块 ===
lsmod