系统老是被我玩坏,重新烧录系统后配置又太麻烦,用shell脚本一键配置一下wifi和静态IP
#!/bin/bash touch /media/fanghaoyu/boot/ssh echo "add ssh:`ls /media/fanghaoyu/boot/ | grep ssh`" touch /media/fanghaoyu/boot/wpa_supplicant.conf sudo echo -e "country=CN ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="HUAWEI" psk="Fanghaoyu1" key_mgmt=WPA-PSK }">>/media/fanghaoyu/boot/wpa_supplicant.conf cat /media/fanghaoyu/boot/wpa_supplicant.conf sudo chmod 666 /media/fanghaoyu/rootfs/etc/dhcpcd.conf sudo echo -e "interface wlan0 static ip_address=192.168.8.88/24 static routers=192.168.8.1 static domain_name_servers=192.168.8.1">>/media/fanghaoyu/rootfs/etc/dhcpcd.conf cat /media/fanghaoyu/rootfs/etc/dhcpcd.conf sudo cp $HOME/下载/VNC-Server-6.6.0-Linux-ARM.deb /media/fanghaoyu/rootfs/home/pi sudo chmod 666 /media/fanghaoyu/rootfs/etc/modules sudo echo "bcm2835-v4l2">>/media/fanghaoyu/rootfs/etc/modules cat /media/fanghaoyu/rootfs/etc/modules echo `ls /media/fanghaoyu/rootfs/home/pi`