Shell/Bash: get public ip linux Example

By

Shell/Bash Example: This is the "get public ip linux" Example. compiled from many sources on the internet by SimpleTutorials.org

get public ip linux

curl ifconfig.me

ubuntu check public ip command line

#4 Ways to Find Server Public IP Address in Linux Terminal
#1. Using dig Utility
dig +short myip.opendns.com @resolver1.opendns.com
#2. Using host Utility
host myip.opendns.com resolver1.opendns.com | grep "myip.opendns.com has" | awk '{print $4}'
#3. Using wget Command Line Downloader
wget -qO- http://ipecho.net/plain | xargs echo
wget -qO - icanhazip.com
#4. Using cURL Command Line Downloader
 curl ifconfig.co
 curl ifconfig.me
 curl icanhazip.com

how to find public ip address in linux

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

120.88.41.175

get public ip linu

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


* Summary: This "get public ip linux" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others