If You are not Behind a Router
- You can find it out using
ifconfig
.
If You are Behind a Router
- Your computer will not know about the public IP address as the router does a network address translation.
curl icanhazip.com
ifconfig
.curl icanhazip.com