How to Find Your IP Address on Ubuntu 22.04


The IP address is an identifier that is used to recognize your device uniquely within a network. It is basically a numerical label that is different for every device that you use such as a mobile phone, laptop, desktop computer, etc. In this guide, we will be discussing the methods of finding the IP address on a Ubuntu 22.04 system.

Private vs. Public IP Address:

Before heading on to the methods of finding the IP address in Ubuntu 22.04, we would like to share with you that there are two different types of IP addresses i.e. private and public. A private IP address is one that is used to identify your device within an internal network without any Internet connection. On the other hand, a public IP address is used for identifying your device uniquely over an Internet network. It means that by using the public IP address of your device, it becomes publicly accessible over the Internet. Now, let us discuss the methods of finding private and public IP addresses on a Ubuntu 22.04 system.

Methods of Finding the Private IP Address Using Terminal:

For finding your private IP address on a Ubuntu 22.04 system, you can make use of either of the following two methods:

Method # 1: Using the “ifconfig” Command:

To find the private IP address using the “ifconfig” command, you have to run it in the manner shown below:

$ ifconfig

This command will display all the network-related details of your system on the terminal from which the private IP address is highlighted in the following image:

Find-Your-IP-Address

Method # 2: Using the “ip addr” Command:

Now, we will use the command shown below to find the private IP address on a Ubuntu 22.04 system:

$ ip addr

Again, this command will also display a bulk of network-related information on the terminal from which the private IP address is highlighted in the image that follows:

Find-Your-IP-Address

Method of Finding the Public IP Address in Ubuntu 22.04:

For finding the public IP address of your Ubuntu 22.04 system, you have to run the command shown below:

$ curl –w “\n” http://ipinfo.io/ip

In this command, we have used the “-w” flag followed by the escape sequence “\n” so that the public IP address can be displayed in a separate line which will make it look more visible.

The public IP address of our Ubuntu 22.04 system is shown in the following image:

Find-Your-IP-Address

Method of Finding the Private IP address Using GUI:

As a pro-tip, we would like to show you the method of finding the IP address through the GUI of a Ubuntu 22.04 system. For that, all you need to do is to click on the network icon located on the system’s taskbar as highlighted in the image shown below:

Find-Your-IP-Address

A menu will appear on your screen from which you have to select the Network Settings option.

This will open up the Network window on your screen from where you will be able to see both the IPv4 and IPv6 addresses of your system as highlighted in the image that follows:

Find-Your-IP-Address

Conclusion:

In this article, we wanted to discuss the methods of finding the private and public IP addresses of a Ubuntu 22.04 system. We first began by highlighting the significance of an IP address followed by throwing light on the difference between a private and a public IP address. After that, we shared with you very quick methods using which you can conveniently find out both the private and public IP addresses of your Ubuntu 22.04 system.

Print Friendly, PDF & Email
Categories