【Ubuntu】Ubuntuを18.04LTSにアップグレードしてみた

今日は、Ubuntu18.04LTSがリリースされたということで、先日作ったUSBメモリに入れたUbuntu17.10をアップグレードしてみようと思います。真似される方は自己責任でお願いします。それからバックアップは必ず取りましょうね。僕は何も考えずにやってしまいます。大したもの入ってませんしね・・・

追記:18.04→19.04へのバージョンアップの記事はこちら

現バージョン確認

まずは、インストールされているUbuntuのバージョンを確認します。

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.10
DISTRIB_CODENAME=artful
DISTRIB_DESCRIPTION="Ubuntu 17.10"

うん。間違いなく17.10が入ってますね。

パッケージのアップデート

インストールされているパッケージをアップデートしましょう。

$ sudo apt update
$ sudo apt upgrade

アップグレードできるパッケージが存在すると、’Do you want to continue? [Y/n]’と聞かれるので、’Y’と入力し、Enterキーをぶっ叩きましょう。
プロンプトが戻ってきたら完了です。

不要なパッケージが存在する場合は、以下を実行しましょう。

$ sudo apt autoremove

こちらも不要なパッケージがあると、聞かれるので、’Y’で答えます。
プロンプトが戻ってきたら完了です。

次に、バージョンアップでの依存関係等のアップグレードをします。

$ sudo apt dist-upgrade

こちらも同様だと思います。
僕の場合は、特にアップグレードはなかったようです。

本題(アップグレード)

いよいよ本題の18.04へのアップグレードです。
以下のコマンドを実行します。新バージョンをチェックし、’/etc/apt/sources.list’をアップデートしてくれるみたいですね。

$ sudo do-release-upgrade

実行してみると、以下のようなメッセージが出てきました。

Checking for a new Ubuntu release
No new release found.

その場合は、以下のように’-d’のオプションをつけて実行すると、アップグレート出来るようです。

$ sudo do-release-upgrade -d

実行すると、アップグレードが始まりました。

Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]
Get:2 Upgrade tool [1,257 kB]
Fetched 1,258 kB in 0s (0 B/s)
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg'
extracting 'bionic.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://jp.archive.ubuntu.com/ubuntu artful InRelease
Get:1 http://jp.archive.ubuntu.com/ubuntu artful-updates InRelease [88.7 kB]
・
・
・
Reading package lists... Done
Building dependency tree
Reading state information... Done

Updating repository information

Third party sources disabled

Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the 'software-properties' tool
or your package manager.

To continue please press [ENTER]

サードパーティー製のパッケージは止められてしまうみたいですね。
あとで、再度復活は出来るみたいです。続けるのでEnterキーを叩きます。

続きます

・
・
・
Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done

Calculating the changes

Calculating the changes

Do you want to start the upgrade?


65 installed packages are no longer supported by Canonical. You can
still get support from the community.

4 packages are going to be removed. 203 new packages are going to be
installed. 1352 packages are going to be upgraded.

You have to download a total of 1,045 M. This download will take
about 5 minutes with your connection.

Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.

 Continue [yN]  Details [d]

さあ、アップグレードの一歩手前ですね。これ以上行ったら引き返せないみたいです。
‘y’を売ってEnterを打ちましょう。
わんさかダウンロードが始まるので、待ちましょう。それなりに時間がかかると思います。

1時間は待ったでしょうか・・・以下のように聞かれました。

・
・
・
Searching for obsolete software
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done

Remove obsolete packages?


28 packages are going to be removed.

 Continue [yN]  Details [d]

時代遅れなパッケージは削除しまっせ・・・(google翻訳ありがとう)とのことだそうです。
‘y’でEnterキーを・・・

続きます。

・
・
・
System upgrade is complete.

Restart required

To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN]

いよいよ最後の質問ですかね。
アップグレードが終わったのでリスタートしますが? って感じですね。
‘y’を入力し、Enterキーをバコッと・・・
再起動が始まります。

再起動が完了しログインすると、デスクトップに以下のようなウィンドウが表示されていると思います。
ウィンドウ

新バージョン確認

最後にインストールされているUbuntuのバージョンを確認します。

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"

うん。間違いなく18.04が入ってますね。
では、ちょっと色々弄ってきます。

参考サイト

関連記事

【Mac App】Domain=NSURLErrorDomain Code=-1...

【Swift4】「'characters' is deprecated」というワ...

【Spotify】spotify_token_swap.php

【Swift4】Stringイニシャライズ時のエラー

【zsh】ラズパイに入れてみた2

【Swift】'applicationFrame' was deprecated...