preface
Laptop Centos7 minimum installation, no network cable, only network card.
Wireless connection
No IFConfig, no IW, and no Internet.
Wireless card on
ip addr # command to check the nic number
Copy the code
ip link set wlp3s0 up Activate the wireless network interface
Copy the code
ip link show wlp3s0 # Check whether the interface is activated successfully
Copy the code
Connection command
wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase "ssid" "psk")
# connect to the specified SSID, replace the SSID with the actual network name, replace the PSK with the wireless password, please keep the quotes
Copy the code
dhclient wlp3s0 Get the IP address (take a little longer here)
ip addr show wlp3s0
Check whether the IP address is successfully obtained through DHCP. If the IP address is allocated, you can access the Internet
Copy the code
Dhclient fails to obtain an IP address
Stopped NetworkManger
systemctl stop NetworkManager
systemctl disable NetworkManager
Copy the code
Reboot the machine and reconnect it again.
Automatic startup connection
The wireless network card is not started. 2. Wifi cannot be automatically connected after starting. 3
Install the NetworkManager – wifi
yum -y install NetworkManager-wifi
Copy the code
Start the NetworkManager
service NetworkManager start # start
chkconfig NetworkManager on Set autoboot
reboot
Copy the code
Wifi connection
nmcli r wifi on # open wifi
nmcli dev wifi # Scan signal
nmcli d wifi connect "ssid" password "psk" # Connection (wireless SSID, password PSK)
Copy the code
Failed to restart the network
nmcli c Check your network connection
Copy the code
Delete all wireless connections in turn
nmcli c delete 987efa7c-3f51-4c77-af03-5401b97d6dd6 # uuid
Copy the code
nmcli d wifi connect "ssid" password "psk" # reconnect
ip addr Check the connection status
Copy the code
If the wifi is still not connected, restart the machine and try again.