首先按照网上的教程,给microSD卡format, 然后把ubuntu镜像拷上去。
开机,初始化系统
然后连一根网线
然后:
·##################### 、 很简单啊! 捷径方法 ##########################
- mkdir 然后 cd 到 ~/Documents/
git clone https://github.com/RPi-Distro/raspi-config.git
-
cd
into raspi-config directory, and do:sudo chmod +x raspi-config
这一步是把 raspi-config 这个文件变成可执行文件。 - raspi-config 是一个文件,跑的话要用:
sudo ./raspi-config
orsudo sh raspi-config
- 然后在ui里面选就行了
`##################### 以下是原答案 花了很多精力试错 #########################
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 dhcp
wpa-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 down
ifconfig 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 dhcp
wpa-ssid WIRELESSSSID
wpa-psk WIRELESSPASSWORD
Step4: reboot
其实都不需要reboot, 只要重启网卡即可:
sudo systemctl restart networking
sudo ifdown wlan0
sudo ifup wlan0
wpa_cli status
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。