いくつか設定方法はあるが、GUIなどのツールを用いない場合の設定は、 恐らく次の netplan を設定するのが正しいと思われる。
nework:
ethernets:
eth0:
dhcp4: true
optional: true
version: 2
wifis:
wlan0:
dhcp4: true
optional: true
access-points:
[SSID]:
password: "[Password]"
# 固定IPアドレスの場合
wlan0:
addresses:
- 192.168.1.5/24
gateway4: 192.168.1.1
nameservers:
search: [mydomain, otherdomain]
addresses: [192.168.1.1, 8.8.8.8 ]
# access-points は複数指定可能。
# [SSID], [Password], [mydomain, otherdomain] は、適宜修正のこと。sudo netplan apply