Linux – How to determine the hostname from an IP address in a Windows network

hostnameiplinuxnetworkingwindows

My LAN has 50 Windows hosts. At the Windows command line I try
ping to get the IP address of a running Windows machine.

The question is how to get hostname of a specific IP address in the same Windows workgroup?

Another question is how to know the hostname of Windows machine from a Linux box if I have an IP address? Which command do you use? I have one host running Kubuntu 9.04.

Best Answer

If you want to determine the name of a Windows machine without DNS, you should try Nbtstat. But that will only work on Windows:

For example,

NBTSTAT -A 10.10.10.10

On Linux, you should try nmblookup that does nearly the same.