0

Is it possible to find the geographical location of a Linux server?

Asked 4 years ago (Apr 05, 2021) in the field of Operating Systems by Hany Pilot

How can i find the IP Address of public servers through the terminal?


Answers


0
Answered 4 years ago (Apr 05, 2021) by Eldernode Staff

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

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day