ubuntu后台配置无线网络

时间:2023-12-22 14:09:02

一、静态配置:

1、编辑 /etc/network/interfaces:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 192.168.5.249
netmask 255.255.255.0
gateway 192.168.5.254
wpa-essid yg123(用户名)
wpa-psk yg1234567890(密码)

2、重启网络

sudo ifdown wlan0 && sudo ifup -v wlan0

二、动态配置:

1、编辑 /etc/network/interfaces:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-essid yg123(用户名)
wpa-psk yg1234567890(密码)

2、重启网络

sudo ifdown wlan0 && sudo ifup -v wlan0