To get the IP address of a server, you must install the curl and jq commands to process JSON data, which are geo-location APIs:
For Ubuntu/Debian:
sudo apt install curl jq
For CentOS/RHEL:
sudo yum install curl jq
For Fedora:
sudo dnf install curl jq
For openSUSE:
sudo zypper install curl jq
To get the public IP address of the servers, use the following curl command to create an API request to ipinfo.io in your terminal:
curl https://ipinfo.io/ip
+8595670151
7 days a week, 24 hours a day