LoginSignup
0
1

More than 1 year has passed since last update.

【Ubuntu Server 22.04.1】ターミナル上でWiFi接続

Posted at

経緯

下記の記事を参考にし、M1MacにUTMでUbuntuServerをインストールしたものの、ネットワーク接続ができずにaptもpingもできずに困ったため

ターミナル上でWiFi接続

etc/netplan/50-cloud-init.yamlを開く

$ sudo vi /etc/netplan/50-cloud-init.yaml

[SSID]と[PASSWORD]を置き換えて、下記のように編集する
[]は残さないように。

/etc/netplan/50-cloud-init.yaml
network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    version: 2
    wifis:
        wlan0:
            dhcp4: true
            optional: true
            access-points:
                [SSID]:
                    password: "[PASSWORD]"

変更の適応

$ sudo netplan apply

うまく行かないときのデバッグコマンド

$ sudo netplan --debug apply

参考

0
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
0
1