2
1

More than 3 years have passed since last update.

Ubuntu Server 20.04をWifiに接続する話

Posted at

概要

Ubuntu Server 20.04(以下Ubuntu Server)でWifiに接続する方法を紹介する。
Ubuntu ServerはDesktop版と違って、ネットワーク周りの管理デーモンがNetwork Managerではなく、netplan + systemd-networkdで動作している。

netplanにはwifiのアクセスポイント情報を書くyamlのディレクティブが存在するが、それを設定してもそのままではアクセスポイントに接続してくれない。

原因は、WPA接続のために必要なパッケージ"wpasupplicant"が足りないため。

対応方法

パッケージのインストール

sudo apt update
sudo apt install wpasupplicant

sudo reboot

Wifiの設定

完全に自分の好み1だが、独自のnetplanの設定は/etc/netplan/99_config.yamlに入れている。

cat - << EOF | sudo tee /etc/netplan/99_config.yaml
network:
  version: 2
  wifis:
    [wifi interface]:
      dhcp4: true
      access-points:
        [SSID]:
          password: [SSID Key]
EOF

sudo netplan apply

参考文献


  1. 好みだけではなく、ubuntuのnetplanのドキュメントに書いてあるというのもある。 

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1