To install a server version of the Linux system to play, the following record the Ubuntu Server 16.04 How to set up WiFi problem:
First look at the information of their network card: The average person is eth0, and Wlan0, but in Ubuntu Server 16.04 into enp4s0 and Wlp5s0, is the first pit bar,
IP addr
1:lo: <LOOPBACK,UP,LOWER_UP> MTU 65536 qdisc noqueue State UNKNOWN Group default Qlen 1 link/loopback 00:00:00: 00:00:00 BRD 00:00:00:00:00:00 inet 127.0.0.1/8 Scope host lo valid_lft forever Preferred_lft Forever Inet6 :: 1/128 scope host Valid_lft forever Preferred_lft Forever
2:ENP4S0: <BROADCAST,MULTICAST> MTU Qdisc noop State down group default Qlen- link/ether 28:d2:44:98:3 3:2A BRD FF:FF:FF:FF:FF:FF
3:WLP5S0: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc MQ State up group default Qlen link/ether 18:CF : 5e:00:84:ba BRD ff:ff:ff:ff:ff:ff inet 192.168.224.102/24 BRD 192.168.224.255 scope global WLP5S0 valid_lft Forever Preferred_lft Forever inet6 fe80::1acf:5eff:fe00:84ba/64 scope link valid_lft forever preferred_lft Forever
The ubuntu-server16.0 itself does not have its own wpa_supplicant, so a wired network installation must be connected at first
Apt-get Install Wpasupplicant
Write Wifi-ssid and password to a configuration file
Wpa_passphrase SSID password > xxx.conf
Edit the network configuration file vi/etc/network/interfaces
source/etc/network/interfaces.d/*# the loopback network Interfaceauto loiface Lo inet loopback
#下面是添加的内容
Auto Wlp5s0iface wlp5s0 inet dhcpwpa-conf/home/ubuntu/xxx.conf #wap-conf-no spaces in front of symbol
Next there are two ways to get the IP address (if not, you can reboot it first):
1, automatically obtain the IP address:
Dhclient Wlp5s0
2. Obtain the IP address manually:
-B
-Fork into background
-c filename
-Path to configuration file
-i interface
-Interface to listen on
Wpa_supplicant-I wlp5s0 -c/home/ubuntu/xxx.conf
Original link: http://www.linuxidc.com/Linux/2016-05/131486.htm
Ubuntu Server 16.04 command line settings WiFi