總目錄 - Ubuntu 應用軟件安裝 && 開發環境搭建測試 目錄
源管理命令
- 配置文件路徑
/etc/apt/sources.list
- 添加倉庫
add-apt-repository xxx
如add-apt-repository ppa:fcitx-team/nightly
- 更新源
apt-get update
- 升級
apt-get upgrade
- 智能升級
apt-get dist-upgrade
修改源爲國內源
apt的三種參數update upgrade dist-upgrade
的區別
- update 更新源
update is used to resynchronize the packageindex files from their sources.
The indexes of available packages are fetchedfrom the location(s) specified in /etc/apt/sources.list.
- upgrade 升級軟件包(有衝突則優先保留當前版本,不做升級)
upgrade is used to install the newestversions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list.
- dist-upgrade 智能升級
dist-upgrade in addition to performing the function of upgrade,
also intelligently handles changing dependencies with new versions of packages;
apt-get has a"smart" conflict resolution system,
and it will attempt to upgrade the most important packages at the expense of lessimportant ones if necessary.