はじめに
Ubuntu Desktop 20.04 LTS のざっくりしたインストールと初期設定の手順の覚書です。
インストール
公式からイメージをダウンロードし、マウント・実行します。
インストーラー起動後、日本語を選択して「Ubuntu をインストール」をクリックします。

キーボードレイアウトで「japanese」を選択して「続ける」をクリックします。

「ディスクを削除して Ubuntu をインストール(デフォルト)」を選択して「インストール」をクリックし、「ディスクに変更を書き込みますか?」で「続ける」をクリックします。

住んでいる地域を指定し、ユーザー名・パスワードを設定して「続ける」をクリックするとインストールが始まります。

インストール完了後は再起動が必要です。
初期設定
vim インストール
$ sudo apt install vim
vim 設定
- デフォルトの文字コードに UTF8 を使用し、指定した文字コードを自動判別
- エディタの自動インデントをオフ
$ vim ~/.vimrc
set encoding=utf-8
set fileencodings=iso-2022-jp,euc-jp,sjis,utf-8
filetype indent off
固定 IP アドレスの設定
$ sudo vim /etc/netplan/99_config.yaml
network:
version: 2
renderer: networkd
ethernets:
ens33:
addresses:
- 192.168.1.150/24
gateway4: 192.168.1.2
nameservers:
search: [mydomain, otherdomain]
addresses: [1.1.1.1, 8.8.8.8]
インターフェースの設定更新
$ sudo netplan apply
XRDP のインストール
$ sudo apt install xrdp
$ sudo systemctl enable xrdp
$ sudo systemctl status xrdp
$ sudo ufw allow from any to any port 3389 proto tcp
SSH のインストール
$ sudo apt install openssh-server
$ sudo systemctl enable ssh
$ sudo systemctl status ssh
$ sudo ufw allow from any to any port 22 proto tcp
Python 関連インストール
- Python3.8 はデフォルトでインストールされていたので、pip のみインストール
- beautifulsoup4 モジュールと lxml ライブラリをインストール
$ python3 --version
Python 3.8.10
$ sudo apt install python3-pip
$ pip3 install beautifulsoup4
$ pip install lxml
関連記事
はじめに Ubuntu Desktop 20.04 LTS で Google Drive をマウントする際の手順です。 オンラインアカウントの設定 GUI 左下の「アプリケーションの表示」から検索ワードで「online」と[…]
以上
参考書籍
created by Rinker
¥4,180 (2025/02/22 08:59:20時点 楽天市場調べ-詳細)