使用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的選擇進行更新 |