Detailed Centos7 method of using wireless WiFi connection _linux

Source: Internet
Author: User
Tags dmesg

When using CentOS, you have never tried to use WiFi, which is wired. Today, I installed a centos7 on my laptop and found no wifi at all. So I inquired about the information.

First, the order used

DMESG | grep firmware (see if there are any firmware requests from the wireless adapter)

Iw

   IW Dev (Find wireless network card port)
   IW wls1 link (view WLS1 network connection condition) IW wls1 Scan
   | grep SSID (view WLS1 network WiFi accessible)

Ip:

   IP link set wls1 up (wireless network port WLS1
   on) IP link show wls1 (Display wireless port WLS1 connection condition)
   IP addr Show wls1 (display assigned IP address, Particularly useful to see if the IP address was successfully automatically obtained by DHCP 

Wpa_supplican:

Wpa_supplicant-b-I wlp3s0-c < (wpa_passphrase "SSID") (Connection to wireless network SSID, password PSK)

Dhclient:

Dhclient wls1 (assign IP address to WLS1)

If you need to use the above command, you can simply change the WLS1 directly to your own network port.

Second, the specific process:

1. See if you need to install the firmware

Most wireless cards also require firmware. The kernel typically automatically detects and loads both, and if you get output similar to siocsifflags:no such file or directory, you'll have to load the firmware manually. If unsure, check kernel logs with DMESG to see if there are any firmware requests from the wireless card. For example, you have an Intel chipset, which is probably the output:

# DMESG | grep firmware
firmware:requesting Iwlwifi-5000-1.ucode

Without output, the system's wireless chip does not require firmware.

2. View wireless network port:

#iw Dev (interface is the wireless network slogan behind)

3. Activate the wireless network interface:

 
 

To verify that the interface was activated successfully, you can view the output of the following command:

# IP Link Show wls1

The up in <BROADCAST,MULTICAST,UP,LOWER_UP> indicates that the interface has been activated successfully, and that the subsequent state down is irrelevant.

4. View the wireless network connection:

#iw WLS1 Link

Should initially show no connection

5. Scan for Connected WiFi

#iw WLS1 Scan | grep SSID

Scan for available networks

6. Connect the specified SSID

 
 

Replace the SSID with the actual network name, and the PSK is replaced by the wireless password, keep the quotation marks.

7. Obtain IP assignment with DHCP:

# dhclient Wlp3s0

8. Test whether IP was successfully obtained from the router (important)

#ip Addr Show Wls1

If the IP is assigned, you can access the Internet or ping Direct test

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.