Find Hostname from IP Address in UNIX & Linux

Symptom

You are given an IP address and customer asked you to find the hostname from the IP address.

Solution

1. host IP-ADDRESS

host 192.168.1.1

2. dig -x IP-ADDRESS

dig -x 192.168.1.1

3. nslookup IP-ADDRESS

nslookup 192.168.1.1

4. ping -a IP-ADDRESS

ping -a 192.168.1.1

You May Also Like

Leave a Reply?