The nbtstat command is used exclusively in Windows and is designed to diagnose and resolve problems with NetBIOS name resolution over TCP/IP. (The abbreviation nbt stands for NetBIOS over TCP/IP.) With this command, you can view information about NetBIOS names on the local computer, check cached names, track active sessions, and identify name conflicts on the network.
For example, you can use the -a switch to display the cached name table for a specific computer by specifying its name. The result will be a list of NetBIOS names, their type (unique or group), and registration status. Additionally, the IP address of the host and the MAC address of the network card are displayed. This information is especially useful when diagnosing problems with network connectivity, resource access, or name conflicts in a workgroup.
The nbtstat command supports a variety of switches that allow you to obtain different types of information and manage the NetBIOS cache. The -A key displays the name table of the specified computer by its IP address, and -c shows the contents of the local NetBIOS cache. With -n, you can view the NetBIOS names registered on the local computer, and the -r key displays the number of names resolved via broadcast or WINS server.
The -R key allows you to clear and reload the cached name table from the LMHOSTS file, while -RR first clears all names and then re-registers them. The -S and -s commands provide information about current sessions, with -s additionally converting destination IP addresses to NetBIOS computer names.
Using nbtstat helps system administrators and experienced users quickly identify and resolve network name issues, verify that network services are working correctly, and ensure stable communication between computers on the local network. The command is especially useful in environments with a large number of devices, where correct registration of NetBIOS names is critical for sharing resources and exchanging files.