Ad

otwol
asked Aug 06 2019
Answer
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}'

linuxhelp
asked Aug 06 2019
edited Aug 06 2019
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