LoginSignup
0
0

More than 1 year has passed since last update.

ubuntu22.04 LTSでwifi設定をCLIで行う

Last updated at Posted at 2023-03-15

wifiのパスワードを暗号化する

$ sudo wpa_passphrase SSID PASSWORD
network={
        ssid="SSID"
        #psk="PASSWORD"
        psk=hogehogefugafugafoofoovarvar

netplanの設定

$ sudo vi /etc/netplan/50-cloud-init.yaml
-----
network:
ethernets:
    eth0:
        dhcp4: true
        optional: true
version: 2
#####ここから追記箇所#####
wifis:
    wlan0:
        optional: true
        access-points:
            "SSID":
                hidden: true #SSIDステルスの場合必要
                password: "hogehogefugafugafoofoovarvar"
        dhcp4: true

設定反映

$ sudo netplan apply

timezoneの変更

$ date
$ sudo timedatectl set-timezone Asia/Tokyo
$ date

以上。

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