使用apt工具
apt相关文件和目录
/etc/apt/sources.list—设置软件包的获取来源
/etc/apt/apt.conf—apt配置文件
/etc/apt/apt.conf.d--apt的零碎配置文件
/etc/apt/preferences--版本参数
/var/cache/apt/archives/--存放已经下载的软件包
/var/cache/apt/archives/partial//var/lib/apt/lists/--存放已经下载的软件包详细信息
/var/lib/apt/lists/partial/--存放正在下载的软件包详细信息
/etc/apt/sources.list文件内容详解:
debhttp://cn.archive.ubuntu.com/ubuntu/ natty main restricted
deb-srchttp://cn.archive.ubuntu.com/ubuntu/ natty main restricted
debhttp://cn.archive.ubuntu.com/ubuntu/ natty-updates main restricted
deb-srchttp://cn.archive.ubuntu.com/ubuntu/ natty-updates main restricted
debhttp://cn.archive.ubuntu.com/ubuntu/ natty universe
deb-srchttp://cn.archive.ubuntu.com/ubuntu/ natty universe
debhttp://cn.archive.ubuntu.com/ubuntu/ natty-updates universe
deb-srchttp://cn.archive.ubuntu.com/ubuntu/ natty-updates universe
debhttp://cn.archive.ubuntu.com/ubuntu/ natty multiverse
deb-srchttp://cn.archive.ubuntu.com/ubuntu/ natty multiverse
debhttp://cn.archive.ubuntu.com/ubuntu/ natty-updates multiverse
deb-srchttp://cn.archive.ubuntu.com/ubuntu/ natty-updates mutiverse
debhttp://security.ubuntu.com/ubuntu natty-security main restricted
deb-srchttp://security.ubuntu.com/ubuntu natty-security main restricted
debhttp://security.ubuntu.com/ubuntu natty-security universe
deb-srchttp://security.ubuntu.com/ubuntu natty-security universe
debhttp://security.ubuntu.com/ubuntu natty-security multiverse
deb-srchttp://security.ubuntu.com/ubuntu natty-security multiverse
deb【或deb-src】网络地址 主版本号 软件仓库1软件仓库2软件仓库3……
main是自由软件,提供完全支持
restricted不是完全自由软件,但因为被广泛使用,所以被完全支持
multiverse是非自由的,完全没有支持
universe不提供安全补丁等支持
apt-get命令
命令 |
功能 |
update |
更新软件列表 |
upgrade |
升级系统中的软件 |
install |
安装软件 |
remove |
卸载软件 |
autoremove |
仅删除那些不需要再次下载的软件 |
purge |
彻底产出软件(包括配置文件) |
Source |
下载源码包 |
build-dep |
自动下载安装编译某个软件所需要的软件 |
dist-upgrade |
升级整个发行版本 |
Clean |
删除本地缓存的所有软件包 |
Autoclean |
删除本地缓存的无用的软件包 |
Check |
检查是否存在有依赖问题的软件包 |
dselect-upgrade |
安装dselect的选择进行升级 |