Kali Linux is a robust ethical hacking and penetration testing Linux distribution that provides a wealth of tools to security professionals and network analysts. When you connect your Kali Linux system to the Internet, it automatically acquires the two types of IP addresses; local or private IP address and public IP address. The local IP address is the address that is used for communication within the network. It allows the devices to communicate with each other inside a specific network. The public IP address is a single global address that allows you to connect to the router and servers worldwide; it is the address that can be seen by the people worldwide.
In this guide, you will learn:
Note: Throughout this article, the term IP address will refer to the local or private IP address, while the term public IP address will remain unchanged.
How to Find IP Address in Kali Linux
You can find IP address in Kali Linux using:
How to Find IP Address in Kali Linux Using GUI
Finding the IP Address in Kali Linux from the GUI is a straightforward task. You can do it by navigating to the Network Manager icon on the desktop, right-click on it, then click on the Connection Information:
In the Wired connection tab, you will find your Kali Linux system’s IP address under the IPv4 section in the IP address row:
How to Find IP Address in Kali Linux Using Terminal
There are multiple commands to find the IP address in Kali Linux using terminal, which are given below:
How to Find IP Address in Kali Linux Using Terminal with hostname Command
The hostname command is a widely used Linux command that retrieves the hostname of your operating system. However, if you run hostname command with -I argument, you will get the IP address of your Kali Linux system:
How to Find IP Address in Kali Linux Using Terminal with ip Command
The ip command is a powerful tool used to configure network interfaces on Linux systems. You can use the ip command to bring your network interfaces up and down, or remove addresses and routes and more. Besides that, you can also use the ip command in Kali Linux through the following way to get the IP address of a network interface connected to your system.
You must ensure whether your device is connected to the Internet through Wi-Fi or Ethernet. If it is connected to Wi-Fi, you have to find the IP address is wlan0 section.
The ip command can also be used with the add argument instead of a to get the similar output:
You can also add show with the ip addr command to get the IP address in Kali Linux system:
If you want to find the IP address of a specific interface on Kali Linux system, you can simply use the ip add show command with dev argument and network interface name, as shown below:
Note: Ensure replacing the eth0 with the network interface through which your Kali Linux system is connected to the Internet.
The ip command can also be use with -r flag to get the IP address of your Kali Linux system:
How to Find IP Address in Kali Linux Using Terminal with ifconfig Command
The ifconfig is a command-line network manager tool that is widely used to configure and view the network status across the device on your system. You can use the ifconfig command on Kali Linux to find the IP address of the system.
Note: In case you are encountering an ifconfig command not found error, run the following command to install network utilities and fix the error.
The ifconfig command can also be run in the following way to get the IP address in Kali Linux system:
How to Find IP Address in Kali Linux Using Terminal with nmcli Command
nmcli is a network manager command-line tool that manages and controls the network on your Linux system. nmcli is preinstalled on almost all Linux distributions, including Kali Linux. To get a complete list of network devices information on your Kali Linux system including their IP address, you can use the following command:
To make the output easier to read, you can add -p argument with nmcli keeping the device show argument at the end:
In this way, you will be able to find your Kali Linux IP address.
How to Find Public IP Address in Kali Linux
Besides finding the private IP address in Kali Linux, you can also find the public IP address from:
How to Find Public IP Address in Kali Linux with curl Command
curl is a command-line utility that allows you to transfer data through various network protocols. There are multiple curl commands you can use to find the public IP address in Kali Linux, as given below:
The first curl command can be used with the ifconfig.me website to get the public IP address on the Kali Linux terminal:
The next curl command can be used with the ifconfig.io website to find the public IP address on Kali Linux:
You can also use the following curl command with ipinfo.io website to get the public IP address on Kali Linux:
How to Find Public IP Address in Kali Linux with dig Command
Domain Information Groper, commonly referred to as dig is a command line utility used for getting DNS name servers information. To get the public IP address in Kali Linux with dig command, you can run the below-given command:
How to Find Public IP Address in Kali Linux with wget Command
wget is a widely used command-line utility for downloading something from the Internet directly from the terminal:
Conclusion
Finding the IP address in the Kali Linux system will help you in remotely accessing the system, sharing folders across the system or auditing the security of the system. You can find the Kali Linux IP address through GUI and terminal. For GUI, simply navigate to the Connection Information option by right-clicking on the Network Manager icon to find the IP address of Kali Linux. For the terminal, you can use commands like hostname, ip, ifconfig and nmcli to get the IP address in the Kali Linux system. For finding the public IP address, you can use commands like curl, dig or wget provided in the above-section of this guide.
By day, I am an engineer and researcher, building bridges and figuring out how the universe works. But when the clock strikes five, I turn into a wordsmith!
I write about my adventures on my blog, sharing tips and tricks to help others join the tech fun. I have worked on Raspberry Pi, Ubuntu, Debian, and Laptops. Right now, I have accepted the challenge of working on the Kali Linux system, and with my vast expertise in Linux systems, I will help users overcome the challenges through my blogs.