This page looks best with JavaScript enabled

Check External IP in Linux Server

 ·  ☕ 1 min read  ·  ✍️ Chris Titus

All these commands check external IP in Linux Terminal for any Linux system.


Nice format for External IP

curl -s | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

Short and Simple to remember


For those with security concerns without using curl

dig TXT +short | awk -F'"' '{ print $2}'

Any of these commands will achieve the same result, so pick which one you like best. Personally, for business and professional environments I stick with dig and just make an alias for it, however, for home projects a simple curl is great.

Chris Titus Tech


Exclusive Content

  • Members Section (CC Only)
    • Digital Downloads with Guides and Pre-Built Images
    • Monthly Members Only Video
    • $5 Per Month (100% of Proceeds goes to Chris Titus Tech)
  • YouTube Chris Titus Tech Membership (All Payments Accepted)
    • Monthly Members Only Video
    • YouTube Emojis for Comments and Live Chat
    • YouTube Badges that changes based on membership time for comments and chat.
    • All YouTube comments are highlighted when I review comments daily.
    • $4.99 Per Month (70% of the Proceeds goes to Chris Titus Tech)

Chris Titus
Chris Titus
Tech Content Creator