The quickest way to get your public IP address from a terminal is curl https://ipcomet. com . It prints your address and nothing else, so the output can go straight into a script.

Source: [Dev.to](https://dev.to/ishantsinghdev/how-to-get-your-public-ip-address-from-the-command-line-kd8)

Sponsored