How to get to know you Ubuntu server public IP

When come to configure server, we always want to know what’s our server public IP is in order to whitelist or configure the security access to it, when using Widnow server, you may easily open your browser and browse to the website such as http://www.ip2location.com or http://www.whatismyip.com to get to know your public IP.

In Linux CLI environment you don’t have such as facility to doing so, you may need to using command line to query and doing some filtering in order to get your server public IP.

The following are few of the way where you may query and check what’s your server Public IP: