首先按照網上的教程,給microSD卡format, 而後把ubuntu鏡像拷上去。
開機,初始化系統
而後連一根網線git
而後: github
·##################### 、 很簡單啊! 捷徑方法 ##########################ubuntu
git clone https://github.com/RPi-Distro/raspi-config.git
cd
into raspi-config directory, and do: sudo chmod +x raspi-config
這一步是把 raspi-config 這個文件變成可執行文件。sudo ./raspi-config
or sudo sh raspi-config
`##################### 如下是原答案 花了不少精力試錯 #########################less
For the image with apt installedui
Step1:this
sudo apt-get install wireless-tools
Step2:rest
sudo apt-get install wpasupplicant
Step3: add to /etc/network/interfaces
:code
auto wlan0 iface wlan0 inet dhcp wpa-ssid WIRELESSSSID wpa-psk WIRELESSPASSWORD
Step4: comment from /etc/network/interfaces
the line:orm
#source /etc/network/interfaces.d/*.cfg
the commented interfaces.d/*.cfg
file contains settings for the eth0.server
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