首先按照网上的教程,给microSD卡format, 然后把ubuntu镜像拷上去。
开机,初始化系统
然后连一根网线

然后:

For the image with apt installed

Step1:

sudo apt-get install wireless-tools

Step2:

sudo apt-get install wpasupplicant

Step3: add to /etc/network/interfaces:

auto wlan0 iface wlan0 inet dhcpwpa-ssid WIRELESSSSID wpa-psk WIRELESSPASSWORD

Step4: comment from /etc/network/interfaces the line:

#source /etc/network/interfaces.d/*.cfg

the commented interfaces.d/*.cfg file contains settings for the eth0.

I do not understand why but leaving this line active and adding the wlan0 config would crash the system at boot.

Step5: reboot

For the core image without apt installed:

Step1:

ifconfig wlan0 downifconfig wlan0 up

Step2: create wireless config file:

sudo vi /etc/network/interfaces.d/wlan0

Note: I tried without sudo but it would not let me save the changes

Step3: add the following content

auto wlan0 iface wlan0 inet dhcpwpa-ssid WIRELESSSSID wpa-psk WIRELESSPASSWORD

Step4: reboot

其实都不需要reboot, 只要重启网卡即可:

sudo systemctl restart networkingsudo ifdown wlan0sudo ifup wlan0wpa_cli status

参考:
https://askubuntu.com/questio...