在終端中輸入如下命令即可:
$ curl ipinfo.io
返回信息
{
"ip": "183.95.xxx.xxx", // 此處為本機在網絡上的ip(會變,不是每天都一樣)
"city": "Wuhan", // 城市名的拼音
"region": "Hubei", // 區域名的拼音
"country": "CN", // 國家代號
"loc": "3x.5833,1xx.xxxx", // 坐標
"org": "AS4837 CHINA UNICOM China169 Backbone", // 運營商信息
"timezone": "Asia/Shanghai", // 時區
"readme": "https://ipinfo.io/missingauth"
}