PopOS

How to Find Your IP Address on Pop!_OS

An IP address is a codename on a network of computers which stands for ‘Internet Protocol.’ It acts as a mailing address and ensures that the sent network is received on the correct system. Before proceeding further, we will learn about the IP address. Each system in a network has its IP address which communicates through the internet protocol. Here are the types of IP addresses:

  1. Public IP Address: ISPs provide the public IP address to routers so your system can connect to the internet directly. Instead of giving a home address, sending mail to the PO is as easy as connecting to the internet using a public IP address. It is very noticeable but it is also safe.
  2. Private IP Address: The address that the network router assigns to your device is the private IP address of that device, which users can also hide. Each device has a different private IP address on the same internal network that allows them to communicate with each other.

Additionally, IP addresses are available in two versions: IPv4 and IPv6.

  • An older internet protocol version is IPv4, which uses a 32-bit number.
  • IPv6 is its updated version which uses 128 bits.

Let us now take a look at the approach you can use to find your IP address on Pop!_OS without getting any errors.

How to Find Your IP Address on Pop!_OS 22.04

You can find your public and private IP addresses on Pop!_OS through CLI and GUI methods. So, let us discuss them:

Command-Line Approach (CLI)

There are different command methods to find your private IP address. Here, we will discuss the CLI methods. And for this, first, open the terminal.

First, we will find the IP address with the ip command. Terminal displays the network adapters when you run any of the following commands:

ip addr

ip address

ip a

ip addr show

ip a list

The numbers after the slash (-/24) and (-/64) indicate the size of the network. It helps with mapping and scanning network size.

The above entries will include a Wi-Fi (wireless) and an Ethernet (wired) adapter. Virtual adapters may be included as well. Most often, only one entry lists an IP address that you need.

If you want minimal details, then go through the following hostname command to find your private IP address:

hostname -I

Similarly, you can also find the hostname’s network address(es) with the help of the following hostname command:

hostname -i

To find out your private IP address, run the command below.

ip route get 1.2.3.4 | awk '{print $7}'

Through the ifconfig command, you can easily find your system’s IP address easily. This command displays all the system’s labeled network connections, including MULTICAST, RUNNING, BROADCAST, and UP. Also, it lists the IP addresses of both IPv4 and IPv6 separately.

ifconfig

In the above output, you can see the term LOOPBACK, which refers to the IP address that returns the traffic to the same computer.

Mostly, this command is present by default in all Linux distros. If you do not have it in your system, download it through the following command:

sudo apt install net-tools

Through the following nmcli command, you can find out the internal IP address of your system along with the complete details of the device.

nmcli -p device show

You can also find the public IP address through two CLI approaches:

Method 1: Run the following commands in the terminal to know your public IP address:

  1. curl -s https://icanhazip.com
  2. curl ipinfo.io/ip
  3. curl ifconfig.me
  4. curl checkip.dyndns.org
  5. host myip.opendns.com resolver1.opendns.com
  6. curl ident.me
  7. curl api.ipify.org
  8. dig +short myip.opendns.com @resolver1.opendns.com
  9. curl ipecho.net/plain
  10. wget -O – -q https://checkip.amazonaws.com

Method 2: You can also find your public or external IP address by opening the following websites on the browser.

https://icanhazip.com

https://www.whatismyip.com

Graphical Interface Approach (GUI)

You can also find your system’s IP address using a GUI or point-and-click interface:

First, go to the application menu and type Settings in the search box.

Click on the settings icon as seen in the above image, and then click on Network. Afterward, click on the settings icon marked in the following image.

Clicking this will bring up a pop-up window that looks like this.

Here, you will get the details of the wired settings, in which you will get both the IPv4 and IPv6 addresses of your system.

Conclusion

An IP address is required in many activities like connecting a server, pinging a host, debugging a network, and clustering. In this tutorial, we have discussed almost all the methods (GUI and CLI) through which you can find your IP address in Pop!_OS 22.04.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.