When working from the Linux command line, you can quickly determine your public IP address by querying an external service.
The simplest method is to use curl with a public IP address service:
curl ifconfig.me
or with the following:
curl -4 icanhazip.com
These commands query an external service to determine the public IP address visible from the Internet.