For developers, opening a browser just to check an IP is a waste of time. Your terminal is a much faster tool.
The Curl Method (Fastest)
Most modern IP services offer a plain-text version for CLI tools. Just run:
curl https://myipaddress.app/api/ip
This will return your public IP address instantly without any HTML fluff.
The Dig Method (DNS-Based)
You can even get your IP without using HTTP, via a DNS query:
dig +short txt o-o.myaddr.l.google.com @ns1.google.com
CLI lookups are essential for Automation Scripts, such as updating firewall rules on the fly.