1.设置静态IP
IP地址:192.168.113.101
账号:pi
密码:raspberry
确认端口设置IP、掩码、路由和DNS
sudo vi /etc/dhcpcd.conf
# Example static IP configuration:
interface eth0
static ip_address=192.168.113.101/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.113.1
static domain_name_servers=8.8.8.8 fd51:42f8:caae:d92e::1
最后执行
sudo reboot
2.设置wifi
设置树莓派的wifi连接
sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="test"
psk="123456"
}
最后执行
sudo reboot
网友评论