कमांड लाइन का उपयोग करके आप कंप्यूटर का भौगोलिक स्थान कैसे ढूंढते हैं?

विषयसूची:

कमांड लाइन का उपयोग करके आप कंप्यूटर का भौगोलिक स्थान कैसे ढूंढते हैं?
कमांड लाइन का उपयोग करके आप कंप्यूटर का भौगोलिक स्थान कैसे ढूंढते हैं?

वीडियो: कमांड लाइन का उपयोग करके आप कंप्यूटर का भौगोलिक स्थान कैसे ढूंढते हैं?

वीडियो: कमांड लाइन का उपयोग करके आप कंप्यूटर का भौगोलिक स्थान कैसे ढूंढते हैं?
वीडियो: Vidmate Se Download Video MX Player Mein Kaise Chalaye | मैक्स प्लेयर में फिल्म क्यों नहीं चल रही है - YouTube 2024, मई
Anonim
किसी कंप्यूटर के स्थान को अपने आईपी पते से सीखने के कई तरीके हैं, लेकिन यदि आप जानकारी खोजने के लिए कमांड लाइन का उपयोग करने का निर्णय लेते हैं तो आप इसके बारे में कैसे जाते हैं? आज के सुपर यूज़र क्यू एंड ए पोस्ट में पाठक को जो जानकारी चाहिए वह ढूंढने में मदद करने के लिए कुछ सहायक सुझाव हैं।
किसी कंप्यूटर के स्थान को अपने आईपी पते से सीखने के कई तरीके हैं, लेकिन यदि आप जानकारी खोजने के लिए कमांड लाइन का उपयोग करने का निर्णय लेते हैं तो आप इसके बारे में कैसे जाते हैं? आज के सुपर यूज़र क्यू एंड ए पोस्ट में पाठक को जो जानकारी चाहिए वह ढूंढने में मदद करने के लिए कुछ सहायक सुझाव हैं।

आज का प्रश्न और उत्तर सत्र हमारे पास सुपरयूसर की सौजन्य है - स्टैक एक्सचेंज का एक उपविभाग, क्यू एंड ए वेब साइट्स का एक समुदाय संचालित समूह।

पॉल फेनविक (फ़्लिकर) की स्क्रीनशॉट सौजन्य।

प्रश्न

सुपर यूज़र रीडर AlikElzin-kilaka कमांड लाइन का उपयोग कर कंप्यूटर के आईपी पता स्थान को कैसे ढूंढना है, यह जानना चाहता है:

How do I find a computer’s internet (IP address) location using the command line? Would I use curl or wget, for example?

कमांड लाइन का उपयोग कर कंप्यूटर का आईपी पता स्थान कैसे मिलता है?

उत्तर

SuperUser योगदानकर्ता AlikElzin-kilaka और बेन एन हमारे लिए जवाब है। सबसे पहले, AlikElzin-kilaka:

There is a service (IPInfo) that can provide the results. You can invoke it using curl, for example:

curl ipinfo.io

Result:

A specific IP’s info can also be requested:
A specific IP’s info can also be requested:

curl ipinfo.io/216.58.194.46

Result:

Image
Image

Source: How to look up the geographic location of an IP address from the command line

बेन एन के जवाब से पीछा किया:

Since the question does not specify an operating system, this is how to get that same information with PowerShell’s curl (actually an alias of Invoke-WebRequest):

(curl ipinfo.io).Content

Which produces a JSON string. To get the object that the JSON represents, use ConvertFrom-Json:

curl ipinfo.io | ConvertFrom-Json

Since that is a PowerShell object, you can easily get specific fields from it. For example, this command gets just the external IP address as a string:

(curl ipinfo.io | ConvertFrom-Json).ip

Note that the geographical information from this service is not super accurate, but it did locate me within 20 miles or so of my actual location and the ISP information seems to be reliable.

स्पष्टीकरण में जोड़ने के लिए कुछ है? टिप्पणियों में विचार व्यक्त करो। अन्य तकनीक-समझदार स्टैक एक्सचेंज उपयोगकर्ताओं से अधिक उत्तरों पढ़ना चाहते हैं? यहां पूर्ण चर्चा धागा देखें।

सिफारिश की: