This article shows how the IP address and geographical location of the remote Linux system can be determined using open APIs and how a bash script can be executed through the terminal.
Source: LXer – How to find the geographical location of a Linux server using the terminal on CentOS 8