From 18.04 to Ubuntu 20.04.jpg

I. 新代号 Focal Fossa

Focal Fossa

“Focal” 有“焦点”、“核心”之意。考虑到 Ubuntu 20.04 是 Ubuntu 的下一个长期支持版本,这是一个非常合适的名称,它将会在接下来成为 Canonical 软件产品组合的核心。“fossa” 则是一种生活在马达加斯加的“猫状、肉食性哺乳动物”,也是当地最大的肉食性哺乳动物。

II. 从 18.04 升级 20.04

ubuntu 18.04 升级 20.04 仅需以下3个命令依次执行即可;

apt-get update && apt-get upgrade
apt-get dist-upgrade

III. 命令的区别

apt-get upgradeapt-get dist-upgrade 本质上是没有什么不同的。只不过,dist-upgrade 会识别出当依赖关系改变的情形并作出处理,而upgrade对此情形不处理。

apt-get upgrade 不会更改已安装的内容(仅适用于版本),apt-get dist-upgrade 将根据需要安装或删除软件包以完成升级,apt upgrade 将自动安装但不会删除软件包。apt full-upgrade执行与相同的功能apt-get dist-upgrade


sudo apt-get update && time sudo apt-get dist-upgrade

以下是摘录man apt-get使用升级将遵循以下规则:在任何情况下,当前安装的软件包都不会删除,或者尚未安装的软件包都不会被检索和安装。如果那对您很重要,请使用apt-get upgrade。如果您希望事情“正常”,则可能要apt-get dist-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. Packages currently installed with new
    versions available are retrieved and upgraded; under no
    circumstances are currently installed packages removed, or packages
    not already installed retrieved and installed. New versions of
    currently installed packages that cannot be upgraded without
    changing the install status of another package will be left at
    their current version. An update must be performed first so that
    apt-get knows that new versions of packages are available.

    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. So, dist-upgrade
    command may remove some packages. The /etc/apt/sources.list file
    contains a list of locations from which to retrieve desired package
    files. See also apt_preferences(5) for a mechanism for overriding
    the general settings for individual packages.




最后修改:2021 年 02 月 03 日 11 : 11 PM