How to Enable WiFi on Kali Linux

Linux Topic

December 20, 2022 by Liosa F

How to Enable WiFi on Kali Linux

To connect to the Internet and access the public network, one of the most common methods is to connect to WiFi, in different environments installed on popular Linux distributions, the way to activate WiFi is different. WiFi can be enabled and disabled both through the desktop environment and through the command line in popular Linux distributions. Most famous Linux distributions have GNOME and KDE desktop environments by default, also applying specific settings in graphical environments is naturally easier than making changes in the terminal environment, and you can easily enable and disable WiFi in graphical environments.

Activating WiFi using the command line is not too difficult, and by the way, in some Linux distributions, it is very simple to apply settings in the graphical user interface. Especially since today scripts are programmed to enable and disable WiFi to make it easier for Linux users to change their settings.

In this article, for your guidance, we will teach you how to enable and disable WiFi in Kali Linux, one of the modern and attractive Linux distributions, which you have already familiarized yourself with, through the desktop environment and the command line.

In this article, for your guidance, we will teach you how to enable and disable WiFi in Kali Linux, one of the modern and attractive Linux distributions, you have already familiarized yourself with Kali Linux, through the desktop environment and the command line. So you can freely use the method that is easier for you to apply your changes. If you want to enable or disable WiFi on Kali Linux, follow the instructions below.

prerequisite

Kali Linux is an excellent distribution in that we have presented how to install Kali Linux in previous tutorials. In this article, we are going to teach how to enable and disable WiFi on the Kali Linux operating system. If you plan to use Kali Linux on the server and access the Internet via WiFi, buying a Linux VPS will provide you with this possibility.

Therefore, one of the prerequisites for executing the instructions that we will teach later is a system or server with the Kali Linux operating system. Additionally, you must have root user privileges and log into the Linux system using the Sudo command.

Enable and disable WiFi in Kali Linux via GUI

How to connect to WiFi in KDE, GNOME, and Xfce desktop environments are almost similar to each other. Follow the steps below to enable or disable WiFi in the Kali Linux desktop environment.

First, find the network icon in the Taskbar, which is located on the right side and at the top of the screen next to the clock icon.

Enable and disable WiFi in Kali Linux via GUI

 

Then, by right-clicking on the Network icon, if you want to connect to WiFi, select Enable Wi-Fi among the options.

If you want to disable the WiFi connection, check the Disable WiFi option.

Enable and disable WiFi in Kali Linux via GUI

After the WiFi adapter is activated, single-click on the Network icon and select the WiFi you want to connect from among the available WiFi networks.

By selecting the desired WiFi network, a window will open asking for the password to connect to the WiFi network. After entering the password, click on the “connect” button to complete the process. Then, by clicking on the Network icon, you will have access to the WiFi network and the Internet.

To view connection details, after connecting to WiFi, right-click on the Network icon from the menu of the Network icon, select “Connection Information” and view information about the WiFi network and your connections.

Enable and disable WiFi in Kali Linux through the terminal environment

You can use different commands to connect to the desired WiFi in Kali Linux. We will teach different methods in the terminal environment to enable WiFi.

  • Connect to WiFi network through iwlist

The first step to connect to a network in the terminal environment is to scan and identify available networks. Running the iwlist command can help you in this regard:

iwlist wlan0 scan

 

Enable and disable WiFi in Kali Linux via command

photo4

Available networks are displayed in the output, to connect to the desired network, you can use the grep command to get a more useful output and connect to the desired network more easily. In this tutorial, we are going to access the ESSID (Extended Service Set Identifier) network, for this reason, use the following command to provide the output of ESSID networks:

iwlist wlan0 scan | grep ESSID

Enable and disable WiFi in Kali Linux via command

After you identify the networks and access the network you want to connect to, you can connect to it using various commands.

1. Connect to WiFi in Kali Linux via nmcli command

To control NetworkManager and connect to the network, using the nmcli command is a simple and practical method. To run the nmcli command, you need to enter the network name and password in the following format:

nmcli d wifi connect [The desired network name ] password [The desired network password]

By executing the above command, you will be connected to the desired network. If you need help about the nmcli command, you can refer to its man page .

2. Connect to WiFi in Kali Linux via nmtui command

The nmtui command, like the nmcli command, provides the ability to control NetworkManager. To connect to the desired WiFi network, type the following command:

nmtui

After running the above command, the menu you see in the image below will be displayed for you, you must select the “Activate a connection” option using the keyboard and then press the Enter button.

Enable and disable WiFi in Kali Linux via command

In the menu that will be displayed again, you will see the available networks, select the desired option using the keyboard and then press Enter.

To connect, it is enough to have access to the Internet in advance, and finally, you must now have access to the WiFi network you want.

After connecting to the desired network, select the Back option and then press Enter.

Enable and disable WiFi in Kali Linux via command

To exit the nmtui command prompt, select Quit and press Enter.

Enable and disable WiFi in Kali Linux via command

  • Connect to the WiFi network through the ip command

Another way to connect to a WiFi network is to use the ip command. To access the desired WiFi adapter name and connection details (if you were already connected to a network), enter the following command in the terminal environment:

$ ip a

If you want to disable your WiFi connection, run the following command:

$ sudo ip link set dev [name of desired WiFi ] down

Also, to enable WiFi by Backupping your desired adapter run the following command:

$ sudo ip link set dev [name of desired WiFi ] up

You can run theip a command again to check the WiFi connection.

Troubleshooting command for when Wifi device drivers are not detected

In Kali Linux, this problem is not common, but if you encounter this issue, you can use the following command to troubleshoot:

sudo apt install kali-linux-wireless

Of course, this problem may be related to the failure of your wireless card, so it is better to identify your network device name first so that you can make the necessary settings:

iwconfig

After identifying the name of your network device, run the following command:

ifconfig [wireless card name ] up

FAQ

Nmcli is a command that allows you to control NetworkManager and provides information about the network status, so run the following command to scan WiFi networks:

nmcli dev wifi

Conclusion

In this article, you learned how to connect to a WiFi wireless network through the graphical environment and the command line of your Kali Linux operating system. The advantage of Linux is that it offers users different methods to apply settings, you can use both the graphical method, which is a simple method for the desired settings and the command line method to connect to WiFi.

Learning the command line method can be useful for you in different situations, especially in this tutorial, this method for connecting to WiFi is similar in most Linux distributions. Also, by connecting to WiFi using the terminal environment, you can easily troubleshoot and solve problems such as lack of connection. Usually, the command line method can work better on servers.

Thank you for choosing our article to read.

Helpful

​ ​ ​ ​

About the Author Liosa F

Love, life, peace and technology are all for the wise man

Leave a Reply

Your email address will not be published. Required fields are marked *