0

How to View the Public IP address of my machine Using Commands On CentOS

I just want to view the public ip address of my machin eThrough Commands On My CentOS machine.WHat are the commands to be run in order to view the Public IP address

otwol
asked Aug 6, 2019
1 Answer
1

Try running these commands to know the Public Ip address of your machine through Command Line Interface

Using CUrl Command
  > curl ifconfig.me
  > curl ifconfig.co
  > curl ifconfig.icanhazip.com

Dig utility:

 dig +short myip.opendns.com @resolver1.opendns.com

Wget Command

 > wget -qO- http://ipecho.net/plain | xargs echo
 > wget -qO - icanhazip.com

Host Utility

> host myip.opendns.com resolver1.opendns.com | grep "myip.opendns.com has" | awk '{print $4}'
View More
linuxhelp
answered Aug 6, 2019
Your Answer
||||
 
100:0