komeの備忘録

東大院卒外資ITエンジニアの技術ブログ

今更ながら Ubuntu 18.04 を Ubuntu 20.04 にアップグレードしてみた

はじめに

1年ほど前からしきりにアップグレードを求められ続けてきた手元の Ubuntu 18.04 を Ubuntu 20.04 に更新してみた。
アップグレードは毎回やるものだが、2年に1度の頻度でやっているため毎回忘れてしまう。次回もきっと忘れるだろうが、せっかくやったので覚書として記事にしてみた。

なおアップグレードに伴い参考にした記事は、以下の公式wikiページである。

http://wiki.ubuntu.com/FocalFossa/ReleaseNotes#Upgrading_from_Ubuntu_18.04_LTS_or_19.10

環境

Laptop: ThinkPad x280
アップグレード前のOS: Ubuntu 18.04 Desktop
アップグレード後のOS: Ubuntu 20.04 Desktop

手順

1. アップデートの確認

Ensure that you have all updates installed for your current version of Ubuntu before you upgrade.

現在の Ubuntu に全てのアップデートが適用されていることを確認する。ということで apt を使って以下のコマンドを実行する。

$ sudo apt -y update
$ sudo apt -y upgrade

2. ネットワーク接続の確認

Confirm that you also have a network connectivity to one of the official mirrors or to a locally accessible mirror as there are no offline upgrade options.

これを読む限り、Ubuntu20.04 はオフラインでのアップグレードができないぽい。
なのでアップグレード前に、ミラーサイトへのネットワーク接続ができることを確認する。

3. いよいよアップグレード

- Open the "Software & Updates" Setting in System Settings.
- Select the 3rd Tab called "Updates".
- Set the "Notify me of a new Ubuntu version" drop down menu to "For any new version" if you are using 19.10; set it to "For long-term support versions" if you are using 18.04 LTS.
- Press Alt+F2 and type update-manager -c into the command box if you are using 19.10; type update-manager -c -d if you are using 18.04 LTS.
- Update Manager should open up and tell you that Ubuntu 20.04 LTS is now available.
- Click Upgrade and follow the on-screen instructions.

まず、Software & Updates を開き、左から3つめのタブにある Updates を選択する。
そして "Notify me of a new Ubuntu version" のドロップダウンメニューで、"For long-term support version" を選択する。これにより現在使用しているバージョンより新しい LTS バージョンが存在した場合に通知されるようになる。

次にここで Alt+F2 を押し、update-manager -c -d を実行する。するとUpdate Manager が実行され、Ubuntu 20.04 LTS が利用可能と通知してくれるはず。 ここでアップデートをクリックし、あとは画面通りに実行を進めていくとアップデートが完了する。

以上!

参考にしたサイト

FocalFossa/ReleaseNotes - Ubuntu Wiki

(C) komee.org