如果你不想全新安裝 Ubuntu 16.04 LTS ,本文將介紹如何從 Ubuntu 15.10 或更老版本的 Ubuntu 進行升級。就目前來看,升級到 Ubuntu 16.04 LTS 的過程中雖然會有些小錯誤,但整個升級過程還算不錯。

在正式開始升級之前,請使用如下命令先對系統進行更新:
sudo apt-get update && sudo apt-get dist-upgrade
上述命令將為當前系統安裝最新可用的軟件包,升級完成后請使用如下命令重啟系統以完成更新安裝:
sudo reboot
系統重啟完成后,執行如下命令可將 Ubuntu 升級到最新的 Ubuntu 16.04 LTS 版本:
sudo update-manager –d
此時「軟件更新器」將搜索最新的系統可用版本,一些時間后將可以看到如下界面:

點擊「升級」按鈕即可開始升級過程。
注意:Ubuntu 16.04 LTS 的 FinalRelease 時間為 2016 年 4 月 21 日,在此之前升級到的都是測試版,請只用于測試環境。
幾分鐘之后,升級向導會提示要卸載的軟件包、將安裝和升級的軟件包個數,還會統計需要下載的包大小,如果確定無誤就點擊「開始升級」。

此時正式的升級就開始了,在如下圖所示的界面中大家可以看到升級的簡易進度。整個升級時間取決于你的網速和計算機性能,大家喝杯咖啡慢慢等待。

升級完成之后,重啟系統就可以使用新版本了。

Ubuntu Server升級到16.04 LTS
下面我們來介紹下如何將舊版 Ubuntu Server 升級到 Ubuntu Server 16.04 LTS。
1、使用如下命令安裝 update-manager-core 包:
sudo apt-get install update-manager-core
2、編輯 /etc/update-manager/release-upgrades 文件,設置 PRompt=normal 或 Prompt=lts 值。

# Default behavior for the release upgrader.
[DEFAULT]
# Default prompting behavior, valid options:
#
# never - Never check for a new release.
# normal - Check to see if a new release is available. If more than one new
# release is found, the release upgrader will attempt to upgrade to
# the release that immediately succeeds the currently-running
# release.
# lts - Check to see if a new LTS release is available. The upgrader
# will attempt to upgrade to the first LTS release available after
# the currently-running one. Note that this option should not be
# used if the currently-running release is not itself an LTS
# release, since in that case the upgrader won't be able to
# determine if a newer release is available.
Prompt=normal
Normal:檢查是否有新系統版本可用,如果有則進行版本更新。
LTS:檢查是否有新的 LTS 版本可用,如果有則更新到 LTS 版本。
由于我們測試的服務器版本為 Ubuntu 15.10,Ubuntu 16.04 是其下一個版本,所以我們配置為 normal。
3、執行如下命令先對系統進行更新:
sudo apt-get update && sudo apt-get dist-upgrade
4、更新完成后使用如下命令重啟服務器:
sudo reboot
5、如果你通過 SSH 遠程連接進行升級,為防止 SSH 連接問題造成 Ubuntu Server 16.04 LTS 升級會話中斷。我們把升級會話丟到 screen 會話當中。因此先要進行安裝:
sudo apt-get install screen
6、使用如下命令啟動 screen 會話
screen –Dr
7、執行如下命令開始升級:
sudo do-release-upgrade –d
在升級開始之后,在有提示時一路按「Y」即可完成升級。

新聞熱點
疑難解答
圖片精選