将Ubuntu(Ubuntu)升级到最新版本的能力有很多好处,包括使用最新的软件和获得新的安全补丁。
在升级到Ubuntu之前,请记住以下几点:
- 升级后,恢复到以前版本的唯一方法是重新安装它。这意味着您可能会丢失现有数据。
- 在做任何事情之前,备份( backup yo)你的(u)文件和文件夹(r files and folders)。
- 确保(Make)您有稳定的互联网(Internet)连接。
- 至少需要一个小时,具体取决于您的互联网(Internet)速度。
为什么要将 Ubuntu 降级到以前的版本?(Why Would You Want to Downgrade Ubuntu to a Previous Version?)
有时,新版本的Ubuntu软件代码中存在一些错误或错误。当有人遇到这些错误时,无论是全新安装还是与 Windows 一起安装双启动(dual boot alongside Windows)时,他们可能希望降级到以前的版本,直到问题得到解决。
您可以通过重新安装以前版本的操作系统来降级 Ubuntu 。( downgrade Ubuntu)不幸的是,除非Ubuntu安装在与您的个人数据和应用程序分开的目录中,否则它们不会被保存。
这是必须在外部硬盘驱动器上备份所有数据的另一个原因。
有几种方法可以升级到最新的 Ubuntu 安装。在本文中,我们将讨论以下方法:
- 图解法。
- 软件更新工具(Software Updater Tool)找不到更新。
- 使用终端和命令行。
- 使用带有zzupdate的单个命令行。
升级到最新版本的 Ubuntu(Upgrade to the Latest Version of Ubuntu)
Ubuntu 的最新版本是 19.10,支持到2020 年 7 月(July 2020)。您可以在此处查看官方发行说明(release notes here)。新的 Ubuntu 用户可以下载 Ubuntu 19.10( download Ubuntu 19.10)桌面版和服务器版并进行安装。
对于那些已经在运行Ubuntu的用户,当新版本发布时,可以立即进行升级。弹出窗口通常会询问您是否要升级到最新版本的Ubuntu。
如果您当前运行的是 18.10,则可以轻松升级到 19.04。如果您使用的是旧版本(18.10 之前),则需要先升级到每个后续版本,然后再升级到 19.04。
从 Ubuntu 18.10 升级(Upgrade From Ubuntu 18.10)
不要忘记在继续之前备份您的文件夹、文件和设置,以防出现问题。
- 要更新,请打开软件(Software)和更新(Updates)应用程序。
- 运行更新检查,您应该会看到新版本的Ubuntu可供下载(如果您在发布日期之后检查)。
- 您还可以使用以下命令行进行升级:
sudo do-release-upgrade -c
图解法(The Graphical Method)
升级Ubuntu的另一种方法是使用标准(Ubuntu)Ubuntu桌面的内置图形工具。您还可以使用终端命令。
默认情况下, Ubuntu(Ubuntu)的标准版本为用户提供升级到新的标准版本。长期支持 ( LTS ) 版本仅提供对新(LTS)LTS版本的升级。
一个例子是那些运行 18.04 LTS的用户。引入Ubuntu 18.10(Ubuntu 18.10)时,并未向他们提供升级。相反,当Ubuntu 20.04 LTS发布时,将提供该优惠。这种行为是可以改变的。
- 在屏幕的左上角,单击GNOME Shell 中的Ubuntu 徽标按钮或 Unity 中的(Ubuntu logo button)活动(Activities )按钮。
- 搜索更新并(Update and )单击软件和更新(Software & Updates)快捷方式。
- 或者,您可以访问Software Updater应用程序并通过单击(Software Updater)设置(Settings)打开窗口。
- 单击更新(Updates)
- 从通知我新的 Ubuntu 版本(Notify me of a new Ubuntu version)旁边的下拉菜单中,根据您想要的更新类型选择长期支持版本(for long-term support versions)或任何新版本。(for any new version)
- 完成后,单击关闭(Close)
如果软件更新程序工具未找到更新,如何升级(How To Upgrade If The Software Updater Tool Doesn’t Find an Update)
如果您没有看到更新,您可以手动搜索更新。
- 首先按Alt+F2,键入以下命令,然后按Enter。
update-manager -c
- 该工具将检查 Ubuntu 的服务器并让用户知道是否有新版本可用。单击(Click)升级(Upgrade )按钮以获取更新版本的Ubuntu。
- 如果使用Software Updater工具未看到升级消息,请按Alt+F2。输入(Enter)下面的命令,然后单击Enter。
/usr/lib/ubuntu-release-upgrader/check-new-release-gtk
使用终端和命令行升级 Ubuntu(Upgrade Ubuntu Using Terminal & Command Line)
您是否一直在使用Ubuntu并希望对其进行更新以获得最新的错误修复、安全补丁和应用程序升级?使用命令行相对简单。下面概述的过程适用于Ubuntu版本 16.04、18.04 和任何其他版本。
它也适用于基于 Ubuntu 的Linux发行版,例如Linux Lite、Linux Mint和elementary OS。
- 从桌面打开终端。您可以使用键盘快捷键Ctrl+Alt+T或在菜单上找到它。如果您登录到Ubuntu服务器,您将可以访问终端。
- 输入以下命令:
sudo apt update && sudo apt upgrade -y
- 您的系统接下来会询问您的密码。使用您的帐户密码。然后按 Enter(Enter)。
- 此命令将更新可用Ubuntu软件包的本地数据库,并让您的系统知道有新版本。如下图所示,运行此命令后,您的系统将显示几个URL(URLs)。这些代表可用的更新。
- 要具体查看哪些软件包有可用的升级,请运行以下命令:
apt list –upgradable
- 键入yes或y以选择要升级的软件包。
- sudo apt update检查您的系统是否有可用的新软件包版本。sudo apt upgrade安装您选择的版本。
通过 zzupdate 使用单个命令行(Use a Single Command-Line With zzupdate)
zzupdate 是一个命令行实用程序,它将完全更新服务器版本和Ubuntu桌面。
- 首先从Gnome(Gnome)仪表板的应用程序启动器打开软件和更新。(Software and Updates)
- 使用以下代码运行单行命令来升级Ubuntu:
$ curl -s https://raw.githubusercontent.com/TurboLabIt/zzupdate/master/setup.sh | sudo sh
此步骤通过将任何旧版本升级到最新可用的稳定版本来跳过发行版升级。zzupdate 的源代码可在 GitHub( available in GitHub)中获得,并且完全免费使用。
当你的Ubuntu升级完成后,zzupdate 会自动重启你的系统。
在尝试上述任何一种方法升级它之前,不要忘记完全备份您当前的 Ubuntu 安装。(Don’t forget to fully back up your current Ubuntu installation before you attempt any of the above methods to upgrade it.)
使用最新测试版本的Ubuntu使用户能够从应用程序升级、修复的错误和安全更新中受益,而无需重新配置或重新安装他们的系统。
How To Upgrade To The Latest Ubuntu
The ability to upgrade Ubuntu to the lateѕt version had many bеnefits, inclυding using the latest software and getting access to new securitу patches.
Before upgrading to Ubuntu, keep the following points in mind:
- Once you upgrade, the only way to revert to a previous version is to reinstall it. This means you might lose your existing data.
- Before doing anything, backup your files and folders.
- Make sure you have a stable Internet connection.
- It will take at least an hour depending upon your Internet speed.
Why Would You Want to Downgrade Ubuntu to a Previous Version?
There are times when a new release of Ubuntu has some errors or bugs in the software code. When someone runs into these errors, either with a fresh installation or when installing a dual boot alongside Windows, they might want to downgrade to a previous version until the kinks are worked out.
You can downgrade Ubuntu by re-installing the previous release of the operating system. Unfortunately, unless Ubuntu is installed in a directory separate from your personal data and apps, they won’t be saved.
This is another reason it is imperative to back up all your data on an external hard drive.
There are several ways to upgrade to the latest Ubuntu installation. In this article, we will discuss the following methods:
- Graphical method.
- Software Updater Tool doesn’t find an update.
- Using Terminal and Command line.
- Use a Single Command line with zzupdate.
Upgrade to the Latest Version of Ubuntu
Ubuntu’s latest release is 19.10 and will be supported until July 2020. You can view the official release notes here. New Ubuntu users can download Ubuntu 19.10 desktop and server editions and install it.
For those who are already running Ubuntu, when a new version is released, upgrades are immediately available. A popup will often ask you if you want to upgrade to the newest release of Ubuntu.
If you are currently running 18.10, it’s easy to upgrade to 19.04. If you are using an older version (before 18.10), you will need to first upgrade to each subsequent version and then upgrade to 19.04.
Upgrade From Ubuntu 18.10
Don’t forget to make a backup of your folders, files, and settings before proceeding in case something goes wrong.
- To update, open the Software & Updates app.
- Run a check for updates, and you should see that a new version of Ubuntu is available for download (if you are checking after the release date).
- You can also upgrade using the command line below:
sudo do-release-upgrade -c
The Graphical Method
Another way to upgrade Ubuntu is by using the built-in graphical tools from the standard Ubuntu desktop. You can also use terminal commands.
Standard releases of Ubuntu offer users an upgrade to new standard releases by default. Long-term support (LTS) releases only offer upgrades to new LTS releases.
An example is for those users running 18.04 LTS. When Ubuntu 18.10 was introduced, they weren’t offered the upgrade. Instead, when Ubuntu 20.04 LTS is released, then the offer will be provided. This behavior can be changed.
- On the top left-hand corner of the screen, click the Ubuntu logo button in GNOME Shell or the Activities button in Unity.
- Search for Update and click the Software & Updates shortcut.
- Or you can access the Software Updater application and open the window by clicking Settings.
- Click Updates
- From the dropdown menu next to Notify me of a new Ubuntu version, choose between for long-term support versions or for any new version based on the type of update you want.
- When done, click Close
How To Upgrade If The Software Updater Tool Doesn’t Find an Update
If you don’t see an update, you can manually search for one.
- Start by pressing Alt+F2, type the following command, and press Enter.
update-manager -c
- This tool will check Ubuntu’s servers and let users know if a new version is available. Click the Upgrade button to get the newer version of Ubuntu.
- If you don’t see the upgrade message using the Software Updater tool, press Alt+F2. Enter the command below and click Enter.
/usr/lib/ubuntu-release-upgrader/check-new-release-gtk
- If there is a new Ubuntu version available, click OK.
Upgrade Ubuntu Using Terminal & Command Line
Have you been using Ubuntu and want to update it to get the latest bug fixes, security patches, and application upgrades? It is relatively straightforward using the command line. The procedure outlined below works for Ubuntu versions 16.04, 18.04, and any other version.
It will also work for Ubuntu-based Linux distributions such as Linux Lite, Linux Mint, and elementary OS.
- From the desktop, open the terminal. You will find it by using the keyboard shortcut Ctrl+Alt+T or on the menu. You will have access to a terminal if you are logged in to an Ubuntu server.
- Enter the following command:
sudo apt update && sudo apt upgrade -y
- Your system will next ask for your password. Use your account password. Then hit Enter.
- This command will update the local database of available Ubuntu packages and let your system know there are new versions. As seen in the screenshot below, after running this command, your system will display several URLs. These represent the available updates.
- To see specifically which packages have an upgrade available, run the following command:
apt list –upgradable
- Type yes or y to select the packages you want to upgrade.
- The sudo apt update checks your system for available new package versions. The sudo apt upgrade installs the versions you select.
Use a Single Command-Line With zzupdate
zzupdate is a command-line utility that will fully update server editions and Ubuntu desktop.
- Start by opening Software and Updates from an application launcher of the Gnome dashboard.
- Run a single-line command using the code below to upgrade Ubuntu:
$ curl -s https://raw.githubusercontent.com/TurboLabIt/zzupdate/master/setup.sh | sudo sh
This step skips the distribution upgrade by upgrading any older version to the latest available stable release. The source code for zzupdate is available in GitHub and is completely free to use.
When your Ubuntu upgrade is completed, zzupdate will automatically reboot your system.
Don’t forget to fully back up your current Ubuntu installation before you attempt any of the above methods to upgrade it.
Using the latest tested version of Ubuntu enables users to benefit from the application upgrades, fixed bugs, and security updates without having to resort to re-configuring or reinstalling their system.