Private IP address
Your private IP address is used to assign computers to your private area without allowing them to be exposed to the internet directly. For example, you may wish to utilize private IP addresses to address every computer inside your home if you have several devices. In this case, the public IP address is provided for your router, and each device connected to your router receives a private IP address via the DHCP protocol from your router.
Public IP address
A public IP address is an Internet-accessible IP address, i.e., directly accessible over the internet and assigned to the network router connected to the ISP. The public IP address is the internationally unique IP address issued to a LAN. Your router now receives the requests and responses and forwards them to you using your private IP address. Google search makes it easy to find your public IP address.
GUI vs. CLI
GUI is a graphical user interface that any user may use as visual advice is provided.
CLI is a command-line interface that uses a terminal to connect to the server and perform UNIX operations.
For example, you could use Windows Explorer and go to some directory (the GUI). Or, you can start a CMD and use the cd command to interact with the OS using CLI.
Find Private IP address via GUI in Ubuntu OS:
For the Ubuntu desktop, one can check the wireless, private IP address using the below steps:
- Open Settings and navigate to Wi-Fi in the left menu.
- Click on the settings icon after the connected wifi network.
- The new tab shows the details, including your IP address, including IPv4 and IPv6 addresses.
Find Private IP Address via CLI in Ubuntu OS
Run the following command to get a private IP address. For private IP addresses, there will be wlan0, wlan1, or wlan2 sections where private IP address details are mentioned.
You can install this command using net-tools which can be installed by:
The private IP address is also found using the following command from the terminal:
Find Public IP address
Write the below command to get your public IP address:
Another alternative to look for your public IP address is to search it on Google engine. Since anyone can view the public IP address, it is openly available on Google search.
In this article, we saw several techniques to find our IP address (both private and public) in Ubuntu OS. One needs to know IP addresses for various activities such as clustering, debugging networks, pinging to a host, connecting servers, etc. IP addresses are unique addresses for each device in the network. You will always need IP addresses whenever you encounter a task related to exchanging data between multiple devices. Besides, in the IP address instances of our web applications, you will need to determine the running instances to respond to the requests made between server and client. All these examples determine the essence of IP addresses in the networking world.