5 Commands to Find Your Public IP Address with Termux 🔥

0

Hey there, It's been a long time to write something about IP Addresses. There will be a conversation "how can we grab someone's IP Address" but sometime questions arises "How can I find my own public IP Address" and I felt that there's must a post explaining you guys about it. Here we will learn 5 different commands that you can use to find your public IP Address in Termux. That's going to be a  pretty cool and simple commands and probably you can learn some new commands today🔥.

5 Commands To Know Public IP Address In Termux

What is IP Address?

IP Address stands for Information Protocol Address is an unique digital unique identity number which is available in every which is connected with Internet. This is a series of number separated by colons(:) depending upon the versions(IPv4 and IPv6) of IP Address. IP Address is used to communicate between two devices present on Internet


Types of IP Address:

There are two types of IP Address available which are used for different - different purposes. Both are useful according to their usage. These two IP Addresses are:
  • Local IP Address: Local IP Addresses are used to communicate locally between two or more devices. Such as wi-fi and hotspot connection, local web servers, accessing devices via SSH in local server. 
  • Public IP Address: Public IP Addresses are used to communicate over the internet in the whole world. Such as sending WhatsApp messages, e-mails etc.


Find Your Public IP Address with Termux?

After understanding what IP Address is, here we are to know how can you "Find Your Public IP Address with Termux". These are total 5 commands which are pretty cool and simple as well. I hope you will enjoy this post. 

#1-2. with curl:

This is pretty cool command. You don't have any need to install it because it comes pre-installed in termux. 

curl ifconfig.me
103.45.210.122

curl ident.me
103.45.210.122 


#3-4. with wget:

This command will fetch ifconfig.io and show you results. This is not pre-installed in termux, you have to install it by executing apt install wget and type following commands.

wget -qO- ifconfig.io
103.45.210.122


wget -qO- https://ipecho.net/plain; echo
103.45.210.122  

#5. with dig:

This command can be used when dnsutils package is installed in termux. You need to install it by apt install dnsutils and you can use following command. 

dig +short myip.opendns.com @resolverl.opendns.com
103.45.210.122

Find Your Local IP Address with Termux:

After knowing how you can "Find Your Public IP Address with Termux", this is also important to know how can you "Find Your Local IP Address with Termux".

Note: Make Sure you have turned on your hotspot or connected with any device or router.

2>/dev/null ifconfig | grep inet | tail -1 | awk '{print $2}' 
192.168.23.210

If you want to know more about your local system or IP Address simply type ifconfig and you will get your network information.


Conclusion:

I hope you have learned how can you Find Your Public and Local IP Address with Termux. All these commands are one liner and can be easily memorized. For more information Subscribe on YouTube.

Read Also:


Post a Comment

0Comments
Post a Comment (0)