Skip to main content

Command Palette

Search for a command to run...

How to Check IP Address on Kali Linux

Updated
6 min read

Checking your IP address on Kali Linux is a basic but essential task. Whether you are setting up a network, troubleshooting connectivity, or configuring security tools, knowing your IP address helps you understand your device’s network identity. Kali Linux, being a popular penetration testing platform, offers several ways to find this information quickly.

In this article, I will guide you through easy methods to check your IP address on Kali Linux. You will learn how to use command-line tools and graphical interfaces to get both your local and public IP addresses. By the end, you’ll feel confident managing your network settings on Kali Linux.

Understanding IP Addresses on Kali Linux

Before diving into commands, it’s good to know what an IP address is and why it matters. An IP address is a unique number assigned to your device on a network. It helps other devices find and communicate with you.

  • Local IP Address: This is your device’s address within your home or office network. It usually starts with 192.168.x.x or 10.x.x.x.
  • Public IP Address: This is the address your device uses on the internet. It’s assigned by your internet service provider (ISP).

On Kali Linux, you might want to check either type depending on your task. For example, when scanning devices on your local network, you need your local IP. When testing external connections, your public IP is important.

Using the Terminal to Check Your IP Address

The terminal is the most powerful way to check your IP address on Kali Linux. Here are some common commands you can use.

1. Using ip Command

The ip command is the modern and preferred tool for network management on Linux.

  • Open your terminal.
  • Type the following command and press Enter:

    ip addr show
    
  • Look for the network interface you are using, such as eth0 for wired or wlan0 for wireless.

  • Under that interface, find the line starting with inet. The number next to it is your IP address.

For example:

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic wlan0

Here, 192.168.1.10 is the local IP address.

2. Using ifconfig Command

Though ifconfig is deprecated in many Linux distros, it still works on Kali Linux.

  • Open the terminal.
  • Run:

    ifconfig
    
  • Find your active network interface.

  • Look for the inet addr or inet field to see your IP address.

Example output snippet:

wlan0     Link encap:Ethernet  HWaddr 00:0c:29:68:22:1c  
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0

3. Using hostname Command

For a quick check of your local IP, you can use:

hostname -I

This command returns your IP address(es) in a simple format.

4. Checking Public IP Address via Terminal

To find your public IP address, you can query an external service using curl.

  • Run:

    curl ifconfig.me
    
  • Or use:

    curl icanhazip.com
    

These commands return your public IP address as seen by the internet.

Checking IP Address Using Kali Linux GUI

If you prefer not to use the terminal, Kali Linux’s graphical interface also lets you check your IP address easily.

1. Using Network Manager

  • Click on the network icon in the top-right corner of your screen.
  • Select “Connection Information” or “Network Settings.”
  • A window will open showing details about your active network connection.
  • Look for the “IPv4 Address” or “IP Address” field to find your local IP.

2. Using Settings Application

  • Open the “Settings” app from the main menu.
  • Navigate to the “Network” section.
  • Select your active network connection (Wi-Fi or Wired).
  • The IP address will be displayed under the connection details.

Troubleshooting IP Address Issues on Kali Linux

Sometimes, you might not see an IP address or get an unexpected result. Here are some tips to troubleshoot:

  • Check if the network interface is up: Use ip link show to see if your interface is active.
  • Restart the network service: Run sudo systemctl restart NetworkManager to refresh connections.
  • Renew DHCP lease: Use sudo dhclient -r followed by sudo dhclient to get a new IP.
  • Check cable or Wi-Fi connection: Make sure your physical connection is working.
  • Verify network configuration files: Look at /etc/network/interfaces or NetworkManager settings.

Why Knowing Your IP Address on Kali Linux Matters

Understanding your IP address is crucial for many Kali Linux tasks:

  • Penetration Testing: You need your IP to configure tools like Nmap or Metasploit.
  • Network Scanning: Identifying your subnet helps in scanning local devices.
  • Remote Access: Knowing your IP allows you to set up SSH or VPN connections.
  • Troubleshooting: Diagnosing network problems starts with checking your IP.

By mastering these methods, you can work more efficiently and securely on Kali Linux.

Summary Table of Commands to Check IP Address

CommandPurposeNotes
ip addr showShow all IP addressesModern and detailed
ifconfigShow network interfacesDeprecated but still useful
hostname -IShow IP addresses quicklySimple output
curl ifconfig.meGet public IP addressRequires internet connection
curl icanhazip.comGet public IP addressAlternative to ifconfig.me

Conclusion

Now you know several easy ways to check your IP address on Kali Linux. Whether you prefer the terminal or the graphical interface, you can quickly find your local and public IP addresses. This knowledge is essential for network management, security testing, and troubleshooting.

By practicing these commands and steps, you’ll become more comfortable navigating Kali Linux’s networking features. Remember, your IP address is your device’s identity on the network, so knowing how to find it helps you stay in control of your environment.


FAQs

How do I find my IP address on Kali Linux using the terminal?

Open the terminal and type ip addr show. Look for the inet entry under your active network interface to find your local IP address.

Can I check my public IP address from Kali Linux?

Yes, use curl ifconfig.me or curl icanhazip.com in the terminal to see your public IP address.

What is the difference between local and public IP addresses?

Local IP addresses are used within your private network, while public IP addresses are assigned by your ISP and visible on the internet.

Is ifconfig still useful on Kali Linux?

Yes, although deprecated, ifconfig still works on Kali Linux and can show your IP address and network interfaces.

How can I troubleshoot if I don’t see an IP address?

Check if your network interface is up with ip link show, restart NetworkManager, renew your DHCP lease, and verify your physical connection.

More from this blog

L

LinuxBloke | Linux Tips, Tricks & Troubleshooting

672 posts