LoginSignup
0
0

More than 5 years have passed since last update.

[Other] One way to get IP location

Posted at

Configuration

Append this line to your ~/.bashrc file.

iplocation() { curl ipinfo.io/$1; echo; }

Usage

iplocation 172.217.161.227

will print something like this

{
  "ip": "172.217.161.227",
  "hostname": "kix06s05-in-f3.1e100.net",
  "city": "Mountain View",
  "region": "California",
  "country": "US",
  "loc": "37.4192,-122.0570",
  "postal": "94043",
  "org": "AS15169 Google LLC"
}

The ipinfo.io has times limitation for free usage.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0