How to Check Your IP Address in Linux: A Simple Guide

Checking your IP address in Linux is a breeze! All you need is a terminal window and a few simple commands. Whether you’re a seasoned Linux user or just getting started, you’ll find that locating your IP address is a straightforward process. Let’s dive in and find out how you can do this in just a few steps.

Step by Step Tutorial: How to Check Your IP Address in Linux

Before we start, it’s good to know that an IP address is like your home address on the internet. It helps to identify your computer on a network. Here’s how you can find it in Linux.

Step 1: Open the Terminal

To begin, you’ll need to open the terminal. You can usually find it in your applications menu, or you can press Ctrl + Alt + T.

The terminal is the gateway to your Linux system’s deeper functions. It’s where you can issue commands and get direct feedback from your computer. Think of it as having a conversation with your machine.

Step 2: Type the ‘ip addr’ Command

Next, type ip addr and hit enter.

This command will display all the network interfaces on your computer. It might look like a lot of text, but don’t worry – you’re looking for something that starts with ‘inet’.

Step 3: Locate Your IP Address

Your IP address will be listed under the ‘inet’ label.

You’ll typically see something like ‘inet’. The numbers before the slash represent your IP address. It’s that easy!

Step 4: Close the Terminal (Optional)

Once you have your IP address, you can close the terminal if you wish, or you can keep it open for other tasks.

Closing the terminal won’t affect your IP address or your network connection. It’s just like closing any other application.

After completing these steps, you’ll have your IP address handy. Whether you’re setting up a server, troubleshooting a connection issue, or just satisfying your curiosity, knowing how to find your IP address is a useful skill in Linux.

Tips for Checking Your IP Address in Linux

  • If you’re using a Wi-Fi connection, look for the ‘wl’ prefix in the command output. That’s usually your wireless interface.
  • Remember that your local IP address is different from your public IP address. The ‘ip addr’ command shows your local IP.
  • If you’re connected to a VPN, you’ll see more than one IP address. The additional one is your VPN address.
  • Don’t confuse the ‘loopback’ address, which usually starts with ‘127.0.’, with your actual IP address. The loopback is for internal system processes.
  • You can also use the command hostname -I to quickly see your IP address without extra information.

Frequently Asked Questions

What is an IP address?

An IP address is a unique identifier for your computer on a network. It’s like a postal address, but for the internet.

Can my IP address change?

Yes, especially if you’re on a home network. Your IP address can change if your router assigns it dynamically.

How do I find my public IP address?

You can visit a website like from your Linux machine, and it will display your public IP address.

What’s the difference between ‘ip addr’ and ‘ifconfig’?

‘Ifconfig’ is an older command that’s being replaced by ‘ip addr’. They both show network information, but ‘ip addr’ gives you more details.

Is it safe to share my IP address?

It’s generally safe to share your local IP address, as it’s usually specific to your home network. However, be cautious with your public IP address, as it can give away your location.


  1. Open the terminal.
  2. Type ip addr and press enter.
  3. Locate your IP address under the ‘inet’ label.
  4. Close the terminal if desired.


Understanding how to check your IP address in Linux is an essential part of navigating the digital world. Whether you’re troubleshooting network issues or setting up a home server, knowing your IP address is key. With the simple steps outlined above, you can quickly and easily find your IP address using the Linux terminal. It’s a skill that might seem small, but it can save you a lot of time and hassle down the road.

Remember, your IP address is like your digital fingerprint. It can reveal your location and is used to establish connections with other devices on the internet. So, while it’s usually safe to share your local IP within a secure network, always think twice before sharing your public IP address.

And there you go! Now you know how to check your IP address in Linux. Keep exploring, keep learning, and most importantly, keep enjoying the freedom and power that Linux offers. Whether you’re a hobbyist or a professional, this knowledge will serve you well. So, go ahead, open that terminal, and take the first steps into a larger world of network understanding. Happy computing!