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:
Afterward, click on “Network”.
On the right side of the screen, click the icon as demonstrated in the following image:
A window containing the private IP address and other related information will open.
The second method to find the private IP address is using the terminal.
Simply open the terminal and type:
The highlighted part of the above image indicates the private IP.
Another command to check private IP is:
Or execute:
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:
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:
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.
from Linux Hint https://ift.tt/3dDXk8X
0 Comments