What's the command to find the name of a computer given its IP address?

I always forget what this command is, but I know it exists in Windows and I assume it exists on the *nix command-line.


dig and host should be what you're looking for ;)

http://www.unix.com/unix-dummies-questions-answers/9866-nslookup-linux.html

On *nix system you can do this command : dig -x [address]

Alternatively you can add +short at the end of the dig command to output only the dns result.

On Windows, use nslookup

EDIT : nslookup work too on *nix systems. More infos on nslookup command whether it seems to have been replace since a while now : http://linuxreviews.org/man/nslookup/


On *nix you can use:

dig -x [address]

On most of the Linux systems that I am aware of you can use:

 nslookup <ip-number EX: 127.0.0.1>

will work on the command line.

Come to think of it, isn't nslookup available on Windows XP?