Categories: Ubuntu

How do I find my IP address in Ubuntu

An IP address is one-of-a-kind or a unique numerical identifier such as 192.168.3.124 for a device on the internet or a local network. IP stands for “Internet Protocol,” a collection of rules and serves two main purposes: network or host interface identification or location address. The IP address can be both private or public. A public IP address can be directly accessible over the internet and is usually associated with the gateway to your local network or the router. Your device has a private IP address concealed when connecting to the internet using the router’s public IP address. We will discuss approaches to check your private and public IP address both by GUI and CLI. Before going on to the implementation part, let’s look at some details of types of IP addresses. Let’s begin!

Private
Sponsored
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.

Sponsored
ifconfig

You can install this command using net-tools which can be installed by:

sudo apt install net-tools

The private IP address is also found using the following command from the terminal:

ip address

Find Public IP address

Write the below command to get your public IP address:

curl http://ipinfo.io/ip

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.

Conclusion

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.

Ubuntu Server Admin

Recent Posts

Building RAG with enterprise open source AI infrastructure

One of the most critical gaps in traditional Large Language Models (LLMs) is that they…

7 hours ago

Life at Canonical: Victoria Antipova’s perspective as a new joiner in Product Marketing

Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…

1 day ago

What is patching automation?

What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…

2 days ago

A beginner’s tutorial for your first Machine Learning project using Charmed Kubeflow

Wouldn’t it be wonderful to wake up one day with a desire to explore AI…

3 days ago

Ubuntu brings comprehensive support to Azure Cobalt 100 VMs

Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…

3 days ago

Ubuntu Weekly Newsletter Issue 870

Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…

4 days ago