How to Find the Public IP Address of Linux Server


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.

  • 2 Utilizadores acharam útil
Esta resposta foi útil?

Related Articles

View Server PHP Environment with phpinfo.php

The phpinfo() function outputs a huge amount of information about the system you're using, such...

How to Create Sudo User on CentOS

This article provides step-by-step setup guide for adding Sudo user to CentOS system. The sudo...

How to Use Sudo

This article provides a guide to using a Sudo user on CentOS server. From the command line,...

Set Server Time Zones with Timedatectl

This article provides a guide to setting the server time and server time zone settings using...

508 Resource Limit is Reached

If your website is on a cPanel hosting account, you may have noticed the following error message:...