These command lines show you how to get your current public IP address just from terminal, just follow one of these way to get yours:
$ curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
Or, the shorter one:
$ curl ipinfo.io/ip