2019年も変わらずLinuxディストリシェアトップをキープしたUbuntuをVirtualBoxでインストールします。
SIerだとRedhatと繋がりのある企業傘下で開発することが多い(気がする)のでお仕事でUbuntuを使うことは、RHEL(Red Hat Enterprise Linux) or CentOSと併せて半々くらいなイメージです。
ただWeb系だとLinuxはUbuntuが多いですし、Ubuntuでしか出来ない事(Android版Chromiumのビルドとか)もあるので、Ubuntuの環境持ってないよ、という方はVirtualBoxで入れておけば事足ります。
目次
環境
- Windows 10
- VirtualBox 6.0.4
- Ubuntu 18.04.3 LTS
VirtualBoxインストール
最新版をインストールしておきます。今回は6.0.14。
Ubuntuのisoファイルをダウンロード
18.04.3 LTSをダウンロード。後でVirtualBoxから読み込みます。
VirtualBoxの設定
VirtualBoxを起動し、新規VMを作成
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu1.png)
メモリサイズ設定。最低限8Gbyteは欲しいところ。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu2.png)
ハードディスクサイズ設定。用途によってお好きな容量で。
(Chromiumをビルドする場合は100Gbyteは最低限必須)
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu3.png)
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu4.png)
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu5.png)
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu6.png)
「設定」→「ストレージ」から光学メディアを追加。ダウンロードしたubuntuのISOファイルを指定後、起動。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu7.png)
Ubuntuインストール
「日本語」に設定。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu8.png)
日本語に設定。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu9.png)
通常のインストール
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu10.png)
ディスクを削除してUbuntuをインストール
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu11.png)
Tokyo
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu12.png)
ユーザ作成。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu13.png)
インストール中。気長に待つ。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu14.png)
インストール完了。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu15.png)
再起動前に光学ドライブからisoファイルを抜いておく。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu16.png)
再起動してログイン。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu17.png)
設定ウィザードを終わらせる。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu18.png)
インストール完了です。
インストール後設定
解像度を上げる
デスクトップ左下のアイコンからアクティビティを開き、「display」で検索。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu19.png)
好みの解像度に設定。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu20.png)
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu21-1024x875.png)
SSHサーバをたてて外部から接続
ターミナルを起動してOpenBSD Secure Shell Serverインストール。
$ sudo apt install ssh
sshサーバが起動したか確認。
$ systemctl status ssh
Oracle VM VirtualBox マネージャー画面から「設定」→「ネットワーク」→「高度」→「ポートフォワーディング」。
ホストIPの任意ポート(今回は192.168.0.5:2222)をゲストOSのSSHポート(10.0.2.15:22)にフォワードさせる。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu22.png)
teraterm等SSHクライアントで接続。
![](https://one-it-thing.com/wp-content/uploads/2020/01/ubu23.png)
![](https://one-it-thing.com/wp-content/uploads/2020/01/unetbootin24.png)
Ubuntuの開発環境が手に入りました。
プログラム開発環境にするも良し、機械学習を勉強するも良し、Chromiumのビルドをしてみるも良し。活用していきましょう。