

IP2Host: Get Hostname from IP – Command Line
source link: https://www.shellhacks.com/ip2host-get-hostname-from-ip-command-line/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

IP2Host: Get Hostname from IP – Command Line
A reverse name resolution zone file is used to translate an IP address in a particular namespace into a fully qualified domain name (FQDN).
If this file has been configured on a name server, it becomes possible to find a hostname from an IP address.
This note shows how to get a hostname from an IP address from the command line in Windows, Linux or MacOS using the nslookup
command.
Cool Tip: How to setup a reverse name resolution! Read more →
Find Hostname from IP
Execute the nslookup
command as follows from a terminal in Linux/MacOS or from a command prompt (CMD or PowerShell) in Windows to find the hostname by IP:
$ nslookup 192.168.0.15 - sample output - Server: router.net.infra Address: 192.168.0.1 Name: my-box-hostname.net.infra Address: 192.168.0.15
The command above performs the reverse lookup and converts the IP address to hostname by querying the name server for the 15.0.168.192.in-addr.arpa
record.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK