Ron*_*oid 25 updates command-line
我想单独更新 Firefox,而不更新所有应用程序。我想通过终端来做。那可能吗?因为我网速很慢。
我在 GNOME 桌面环境中使用 Ubuntu 15.04。
小智 27
要仅自行升级 Firefox,请执行以下操作:
sudo apt-get dist-upgrade firefox
Run Code Online (Sandbox Code Playgroud)
或者
sudo apt-get upgrade firefox
Run Code Online (Sandbox Code Playgroud)
从 man apt-get
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
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. The dist-upgrade command may
therefore 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.
Run Code Online (Sandbox Code Playgroud)
从终端类型只升级 Firefox:
sudo apt upgrade firefox
Run Code Online (Sandbox Code Playgroud)
上面的命令在没有--only-upgrade选项的情况下工作。如果您的 Firefox 已经是最新版本,该命令将不会安装任何新软件包,您将收到以下消息:
firefox is already the newest version.
Run Code Online (Sandbox Code Playgroud)
小智 6
sudo apt-get install firefox
Run Code Online (Sandbox Code Playgroud)
这只会升级firefox到最新版本。
有关详细信息,请使用man apt-get并转到安装部分:
安装
如果您想要升级一个或多个已安装的软件包而不升级系统上的每个软件包,这也是要使用的目标。
与“升级”目标不同,“升级”目标安装所有当前安装的软件包的最新版本,“安装”将仅安装指定软件包的最新版本。
只需提供您想要升级的软件包的名称,如果有更新的版本可用,它将下载并安装它(及其依赖项,如上所述)。