Before anything else, use the iwconfig
command to display the wireless interfaces on your system and check their status
$ iwconfig
From the output above, we can see that we have a wireless interface labeled wlxc4e9840c3fce
. This may be something else for your case. Also, from the output, we can see that we are not connected to any wireless network.
To list wireless interfaces only run the command:
$ iw dev
# wlp2s0
You can also check whether the interface is connected to any wireless device using the command:
$ iw interface_name link
In this case, the command will be:
$ iw wlp2s0 link
The output confirms that we are not connected to any wireless network. Let's now proceed to the next step and connect to a WiFi network.
Before connecting to a WiFi network, it's prudent to perform a scan on the terminal to search the available Wireless networks. To achieve this, run the command:
$ sudo iwlist wlp2s0 scan | grep -i ESSID
The output indicates that we have 2 wireless networks at our disposal which we can connect to. We are going to connect to the 'Milky_Way' network using the nmcli command :