An IP address is a network address of your device when it connects to the internet or local area network. On the internet, IP addresses are allocated to each user which is used to distinctly identify them. . Internet uses this address to get your emails, messages, files, and images from another device of a different identification number (IP).

The IPV4 address is a 32-bit unique number that has two types: public and private. Public IP is used to access the internet while private IP is reserved for local usage.

Knowing your IP address is important especially when you want to create a local area network for gaming or data transferring. It is also important when it comes to troubleshooting your network issues and configuring the firewall. This guide will elaborate on the different methods to check your IP address whether public or private in Linux.

How to find the private IP address in Linux:

There are two ways to check your private IP address. The first is through GUI and the second way is through a terminal. Let’s check the first method.

First, open “Settings” from applications:

<img alt="IP/1_1 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-1_120copy-png.png" data-lazy- height="866" src="data:image/svg xml,” width=”1427″>

Afterward, click on “Network”.

On the right side of the screen, click the icon as demonstrated in the following image:

<img alt="IP/2 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-220copy-png.png" data-lazy- height="772" src="data:image/svg xml,” width=”1044″>

A window containing the private IP address and other related information will open.

<img alt="IP/3 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-320copy-png.png" data-lazy- height="722" src="data:image/svg xml,” width=”994″>

The second method to find the private IP address is using the terminal.

Simply open the terminal and type:

<img alt="IP/5 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-520copy-png.png" data-lazy- height="339" src="data:image/svg xml,” width=”993″>

The highlighted part of the above image indicates the private IP.

Another command to check private IP is:

<img alt="IP/6 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-620copy-png.png" data-lazy- height="156" src="data:image/svg xml,” width=”993″>

Or execute:

<img alt="IP/7 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-720copy-png.png" data-lazy- height="452" src="data:image/svg xml,” width=”993″>

How to find the public IP address in Linux:

Public IP is relatively easier to find. Simply open the web browser and then Google “What’s my IP”. Your public IP address will be displayed:

<img alt="IP/12 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-1220copy-png.png" data-lazy- height="522" src="data:image/svg xml,” width=”1386″>

It can also be accessed using the terminal. There are numerous services that provide your public IP address.

Use the below-mentioned commands to find your public IP:

$ curl checkip.amazonaws.com

<img alt="IP/8 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-820copy-png.png" data-lazy- height="156" src="data:image/svg xml,” width=”993″>

<img alt="IP/9 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-920copy-png.png" data-lazy- height="158" src="data:image/svg xml,” width=”993″>

<img alt="IP/10 copy.png" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/ip-1020copy-png.png" data-lazy- height="172" src="data:image/svg xml,” width=”993″>

Conclusion:

In this post, we have learned the importance of IP addresses, the difference between public and private IP, and how to find both in Linux using different methods. The IP address is a 32-bit address, also known as IPV4, and is a unique identity that helps you connect with other devices on the internet. Local IP addresses are used to connect different devices in order to create a shared local area network. Since the number of internet users is multiplying, the IPV4 address may soon be replaced with a newer IP scheme known as IPV6, which is faster and more efficient.

About the author

<img alt="Sam U" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/CD836339FE0346CD9A43623F995D6B46-150×150.png6030bf8953e5e.jpg" height="112" src="data:image/svg xml,” width=”112″>

Sam U

I am a professional graphics designer with over 6 years of experience. Currently doing research in virtual reality, augmented reality and mixed reality.


I hardly watch movies but love to read tech related books and articles.