apt-get 升级
deb
based distributions provide apt or apt-get to manage packages interactively and from network repositories. While updating packages update
, upgrade
or dist-upgrade
can be used. But what is the difference between these two commands. In this tutorial, we will look at this issue.
基于deb
的发行版提供apt或apt-get来交互式地管理软件包并从网络存储库中进行管理。 在更新软件包update
,可以使用upgrade
或dist-upgrade
。 但是这两个命令之间有什么区别。 在本教程中,我们将研究这个问题。
公寓获取/公寓更新 (Apt-Get/Apt Update)
update
command will simply get the packages information from repositories. These repositories are remote internet sites that provide packages and their metadata. We will get metadata or package information and then compare it with locally installed or downloaded package information and metadata. This will not download any packages.
update
命令将仅从存储库获取软件包信息。 这些存储库是提供程序包及其元数据的远程Internet站点。 我们将获取元数据或软件包信息,然后将其与本地安装或下载的软件包信息和元数据进行比较。 这不会下载任何软件包。
$ sudo apt update
公寓获取/公寓升级 (Apt-Get/Apt Upgrade)
The real update operation will be down with upgrade
command. This command will download packages and upgrade accordingly. So upgrade
command will be run after update
command. We should have root privileges in order to completely update operation so we will use sudo
before upgrade
command.
真正的更新操作将通过upgrade
命令关闭。 此命令将下载软件包并进行相应升级。 因此, upgrade
命令将在update
命令之后运行。 为了完全更新操作,我们应该具有root特权,因此在upgrade
命令之前将使用sudo
。
$ sudo apt upgrade
Apt-Get / Apt Dist-Upgrade (Apt-Get/Apt Dist-Upgrade)
dist-upgrade
command is very similar to upgrade
command. This command will upgrade too but during the upgrade, there will be some prompts related to package configuration. In dist-upgrade
this questions will be answered automatically by apt
which will make our upgrade operation more easy and intelligent.
dist-upgrade
命令与upgrade
命令非常相似。 该命令也将升级,但是在升级过程中,将出现一些与软件包配置有关的提示。 在dist-upgrade
此问题将由apt
自动回答,这将使我们的升级操作更加轻松和智能。
$ sudo apt dist-upgrade
Apt-Get / Apt全面升级 (Apt-Get/Apt Full-Upgrade)
full-upgrade
is the same as dist-upgrade
so we can use both command interchangeable.
full-upgrade
与dist-upgrade
相同,因此我们可以同时使用两个命令。
apt-get 升级