总目录 - 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
的区别
查看帮助信息apt-get --help
update - Retrieve new lists of packages
upgrade - Perform an upgrade
dist-upgrade - Distribution upgrade, see apt-get(8)
- update 更新源
update is used to resynchronize the packageindex files from their sources.
The indexes of available packages are fetched from the location(s)
specified in /etc/apt/sources.list.
- upgrade 升级软件包(有冲突则优先保留当前版本,不做升级)
upgrade is used to install the newest versions 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 less important ones if necessary.