Find public ip on Linux similar to whatismyip.com does in windows
Author
Anjani Phuyal
Date
May 26, 2014
Category
Uncategorized
Read Time
2 min read
wget
wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'That will return your local IP
curl
curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'That one is going to give your current IP, being it public or private. Something like running ifconfig or ip addr
curl ifconfig.meThat is going to return you the public IP you are using to access internet. If you are behind a
#Linux#Networking#IP Address