Finding the Public IP address in a shell script

curl ifconfig.me

curl ifconfig.me/ip (for just the ip)

curl ifconfig.me/all (for more info, takes time)

For more commands visit: http://ifconfig.me/#cli_wrap

Leave a Comment