Auto connect the wifi network on Ubuntu 20.04

作者: shaneZhang 分类: 互联网技术 发布时间: 2021-03-09 23:29

You need to create a wpa_supplicant-wlan0.conf. So use wpa_passphrase to generate one:

wpa_passphrase MyNetwork SuperSecretPassphrase > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Enable it so that it runs on boot:

systemctl enable wpa_supplicant@wlan0.conf

Now make a file at /etc/systemd/network/00-wireless-dhcp.network (it can really be named whatever you want):

[Match]
Name=wlan0

[Network]
DHCP=yes

Now ensure that systemd-networkd.service is enabled.

systemctl enable systemd-networkd.service

Reboot, and it should be working.

本页面支持繁体中文友好显示:Auto connect the wifi network on Ubuntu 20.04

如果觉得我的文章对您有用,请随意打赏。如果有其他问题请联系博主QQ(909491009)或者下方留言!

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注