# ifupdown has been replaced by netplan(5) on this system. See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
# sudo apt install ifupdown
auto wlan0
allow-hotplug wlan0
#iface wlan0 inet static
iface wlan0 inet dhcp
# address 192.168.1.52
# netmask 255.255.255.0
wpa_conf /etc/wpa_supplicant/wpa_supplicant.conf
3. 修改/etc/wpa_supplicant/wpa_supplicant.conf文件
1
$ sudo vim /etc/wpa_supplicant/wpa_supplicant.conf
Killed old client process
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/b8:27:eb:xx:xx:xx
Sending on LPF/wlan0/b8:27:eb:xx:xx:xx
Sending on Socket/fallback
DHCPRELEASE on wlan0 to 192.168.1.1 port 67 (xid=0x13ea153a)
1
$ sudo ifup wlan0
回显:
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/b8:27:eb:xx:xx:xx
Sending on LPF/wlan0/b8:27:eb:xx:xx:xx
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3 (xid=0xd0fcdd63)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4 (xid=0xd0fcdd63)
DHCPREQUEST of 192.168.1.52 on wlan0 to 255.255.255.255 port 67 (xid=0x63ddfcd0)
DHCPOFFER of 192.168.1.52 from 192.168.1.1
DHCPACK of 192.168.1.52 from 192.168.1.1
bound to 192.168.1.52 -- renewal in 2147483648 seconds.