How to Connect to Wi-Fi Through the Linux Terminal With nmcl
As a Linux user, there may come a time when you need to connect to a Wi-Fi network without access to a graphical interface. Fortunately, it is possible to connect to Wi-Fi through the Linux terminal using Network Manager Command Line (nmcl).
Here is a step-by-step guide on how to connect to Wi-Fi through the Linux terminal with nmcl:
1. Open the terminal by pressing Ctrl + Alt + T.
2. Install nmcl by typing the following command:
sudo apt-get install network-manager
3. Once installed, type the following command to list available Wi-Fi networks:
nmcli device wifi list
This will show a list of available Wi-Fi networks, their signal strengths, and security types.
4. Choose the network you want to connect to and note the SSID (network name) and security type (WPA, WPA2, or none).
5. Type the following command to connect to the network:
nmcli device wifi connect [SSID] password [password]
Replace [SSID] with the network name and [password] with the network password.
If the network does not have a password, omit the “password” part of the command.
6. If you are successful, you will see a message indicating you are now connected to the network.
Now that you are connected to Wi-Fi through the Linux terminal, you can browse the web and perform other online activities just as you would through a graphical interface.
To disconnect from the Wi-Fi network, simply type the following command:
nmcli device disconnect [interface-name]
Replace [interface-name] with the name of the Wi-Fi interface.