DEV Community

loading...

How to identify my public IP from Linux CLI

glpzzz profile image Gabriel Alejandro López López Originally published at glpzzz.is-a.dev on ・1 min read

So easy!

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

Enter fullscreen mode Exit fullscreen mode

Discussion

pic
Editor guide
Collapse
arnoleo profile image
Arnaud Léonard

Even shorter :

curl ifconfig.me