Check IP address in terminal on Linux

in linux •  7 years ago 

One line is just as good as the next. Pick your poison:

curl -4 ifconfig.me
curl -s httpbin.org/ip
curl -s http://whatismyip.org/ | grep -oP '(\d{1,3}\.){3}\d+'
curl -s http://wtfismyip.com/text
curl l2.io/ip
curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+"



Credits: commandlinefu

P.S.: The <pre> tag could use some margin-bottom somewhere in the steemit.com css. Just saying.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!