This guide will provide steps to find the public IP address for Linux VPS or dedicated servers.
What is a Public IP Address?
A public IP address, in common parlance, is a globally routable unicast IP address, meaning that the address is not an address reserved for use in private networks, such as those reserved by RFC 1918, or the various IPv6 address formats of local scope or site-local scope, for example for link-local addressing. Public IP addresses may be used for communication between hosts on the global Internet. - Wikipedia
Find Public IP of Linux Server
Login to your server as root, and run the following command:
curl –s https://icanhazip.com
The command will return your system's public IP address, such as:
192.168.0.10
You have now found the public IP address of your Linux server.