How To Find Your IP Address On Windows & Linux
An IP address is a unique identifier of a computer on the internet. Each website and each user has its own unique IP address which corresponds to them.
While an IP address uniquely identifies you, there are two types of IP addresses:
- Public IP address
- Private IP address
The public IP is an address which is unique on a global scale and is assigned to computing devices. It’s more like the postal address of the internet.
The private IP address is used to assign to computers within a private network. For example in a company, each computer has its own identifier which is different from the public one.
But how to find the public and private IP? In this tutorial we will go through the easy steps to see your public and private IP address.
Note that, in this tutorial we are using Ubuntu 20.04 LTS and Windows 10. However the steps shown here will work on other Linux distributions with some minor changes.
How to find Public IP on Windows
- Open Google and search “What is my IP”
- This will display your public IP address
- You can also find your public IP address from what is my IP address website
What does IP address mean?
Each device linked to a computer network is given a numerical label called an Internet Protocol address, or IP address (using the Internet Protocol). A machine's IP address is used to identify it and determine its location.
As each connected device has a different IP address, communication is possible between all of them.
Also, you should be aware that IP addresses come in two flavors: public and private. Similar to how your physical address is used for mail delivery, your public IP address is the address used to communicate over the Internet. But in a local network (such a home with a router), each device is given a private IP address that is exclusive to this sub-network. Without immediately disclosing the public IP address, this is utilized within this local network (which is used by the router to communicate with the Internet).
There is yet another difference between the IPv4 and IPv6 protocols. The traditional IP format, known as IPv4, consists of a simple four-part structure with four bytes separated by dots (e.g. 127.0.0.1). But, IPv4 will soon run out of addresses due to the increase in the number of devices. Because to this, the 128-bit address format known as IPv6 was developed (compared to the 32-bit addresses used by IPv4).
How to find Public IP on Linux (Ubuntu)
To check your public IP address with a graphical interface, follow the steps mentioned above (for Windows)
If you want to check the public IP from the terminal:
echo $(wget -qO - https://api.ipify.org)
OR
echo $(curl -s https://api.ipify.org)
How to find Private IP on Windows 10
- Type ‘cmd’ on the search bar and select the command prompt
- In the command prompt type “ipconfig” and press enter
- Now you will see all the IP addresses of your devices. If you’re connected with an Ethernet cable, check the part corresponding to the IP address.
In the picture above, we connected to the router through WIFI. To find the private IP address you should check the ‘IPv4 address’ under WIFI or Ethernet (whichever one you are using).
How to find Private IP on Linux (Ubuntu)
With graphical interface:
- Click on the top right corner and select the ‘settings’
- Under network you will see the connections. Click on the settings icon
<picture>
- Now a new window will open with the network details. Here you can find the local IP address
<picture>
Without a graphical interface:
- In the terminal, type the following command
ifconfig | grep -w inet | awk '{ print $2}'
- You can also type “ifconfig” to have a detailed report of the network details
Extra Advice: Verify your Public IP Address (for desktop computers)
You can use the curl command to check your public IP address, which is used to connect to servers and other devices. Enter the following command into a terminal once it is open:
curl ifconfig.me
Without any further bulk data, your IP address should be returned. Given that disclosing this information is the same as sharing your home address, I would advise exercising caution.
Reminder: On Linux distributions based on Ubuntu, all you need to do to install curl is type:
sudo apt install curl -y
Searching for "ip address" on Google is another easy approach to see your public IP address.
Conclusion
Congratulations! You made it to the end. I hope this tutorial helped you. Let us know in the comments below if you know any other method to find out the IP addresses.
In this article, I covered the many methods for locating your IP address in Ubuntu Linux as well as a brief explanation of what IP addresses are used for and why they are so crucial to our daily lives.
PS: some details on the pictures are covered due to security reasons.
Do you value your privacy online?
Use VPN Surf and surf safely and securely in the open waters of the internet.