How to see your IP address in Ubuntu

An IP address is like your physical mailing address. Once you connect a Linux distribution like Ubuntu to the internet or a router, your system is assigned two IP addresses. There's the private one, which is used to identify your device on an internal network, and the public IP address, which is what websites see when you connect.




Knowing your IP address on Linux is important in case you have network problems or if you're on the phone with an IT administrator and they need to connect remotely. The good news is that Ubuntu makes it easy to view your IP address. You can use the Terminal or the graphical user interface (GUI) Settings app.


Find a private IP address using the GUI

Checking for a private IP address using the GUI on Ubuntu is easy.

  1. Open Settings.
  2. Click network in the sidebar. (If you are connected to Wi-Fi, select Wi-Fi.)
  3. Click on the Settings Equipment next to the network you are connected to
    A screenshot of the Ubuntu Settings app showing a private IP address

You will see your IP address listed under “IPv4 address”.


Use the terminal to find a private IP address

If you want to find a private IP address on Ubuntu using the command line interface (CLI), only one command is required.

  1. Open terminal.
  2. Load network information:
    ip a
    A screenshot of the Ubuntu Terminal app showing a private IP address

This command will load all available network interfaces. Check the interface you are connected to. The IP address will be listed below.

Use the terminal to find a public IP address

To search for a public IP address using Terminal, you need to have curl installed and run a single command. Follow these steps:

  1. Open terminal.
  2. Install Lure:
    sudo apt install curl
  3. Use Curl to check the private IP address:
    curl ifconfig.me
    A screenshot of the curl command on Ubuntu to display the public IP address

Find a public IP address using the GUI

You can check a public IP address on Ubuntu using a web browser of your choice.

  1. Open your Web browser. (Firefox should be preinstalled.)
  2. Visit whatsmyip.org.
    A screenshot of the public IP address for a web browser in Firefox


You should see your IP address listed at the top of the website.

Next steps and more

Knowing your IP address allows you to dive into more advanced settings. For example, you may want to use a static internal IP address, but this is just one setting that can be changed. Ubuntu is an open-source and highly customizable operating system, giving you plenty of scope to make further changes.

Leave a Comment