[LINUX] Settings such as host name and netplan after installing Ubuntu Server 20.x

When I started Ubuntu Server 20.x on Raspberry Pi 3, various settings were required, so I summarized it as a memo.

Host name setting

$ sudo hostnamectl set-hostname <HOSTNAME>

Network settings (netplan)

/etc/netplan/*.yaml is processed in file name order, and duplicate setting items are overwritten by the file to be processed later. So, create it with a file name that will be processed last

$ sudo vi /etc/netplan/99-manual-config.yaml 

Reflect settings

$ sudo netplan apply

DNS resolver settings

$ sudo vi /etc/systemd/resolved.conf

Specify the IP address of the name server in the DNS = line When specifying multiple servers, separate them with a space.

Reflect settings

$ sudo systemctl restart systemd-resolved.service

Check the setting status

$ resolvectl status

Time zone setting

$ sudo timedatectl set-timezone Asia/Tokyo

Time synchronization setting

$ sudo vi /etc/systemd/timesyncd.conf

Specify the NTP server on the NTP = line When specifying multiple servers, separate them with a space.

Reflect settings

$ sudo systemctl restart systemd-timesyncd

Package manager updates and upgrades

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

Locale setting

$ sudo apt -y install language-pack-ja
$ sudo update-locale LANG=ja_JP.UTF-8

Recommended Posts

Settings such as host name and netplan after installing Ubuntu Server 20.x
Set up Ubuntu as a Linux cheat sheet and https server