From locating a computer on the internet to finding chatrooms, IP addresses are everywhere. They represent whatever device you’re using to access the internet and are essential to making the internet possible.
Knowing what your IP address is can go a long way down in saving you hassle while working out networking issues. Aforementioned, they are extremely helpful in establishing communication because of the simple fact that they are the ‘address’ of your device as the internet knows it.
Many communication forms like SSH and TCP/IP wouldn’t be possible without IPs. In this article, we go over some simple ways to find out your IP address on the Linux OS.
Read more: How to check the OS version in Linux?
Checking your public IP Address
Your public IP address is the one websites and services see when you go online. If you need to know what IP represents you on the internet, you need to use this method.
Step 1: Open up the terminal
Step 2: Type in the following command
This command will fetch your public IP address
Alternatively, you can go to any IP checking website on the internet and can get the same results. Sites like WhatismyIP.com can show not only your IP but some other handy details as well.
Also read: 10 best YouTube downloaders and converters
Checking your local IP Address
Your local IP address is the one assigned to your device on your local network. You might need this if you’re trying to forward ports on your router or allocate bandwidth to devices on a network. Having this information is also immensely helpful in LAN gaming.
Step 1: Fire up the Linux terminal
Step 2: Enter the following command
Under the inet heading, you can find your local ipv4 address. The inet6 heading will show your local ipv6 address.
Alternatively, you can also try the hostname command with the -I flag as follows
This command will fetch your device’s local IP address.
Someone who writes/edits/shoots/hosts all things tech and when he’s not, streams himself racing virtual cars. You can reach out to Yadullah at [email protected], or follow him on Instagram or Twitter.