NetBIOS is a very popular and useful protocol used to share resources like file, system information between Windows computers. nbtstat command is used for NetBIOS name cache and names registered with the Windows Internet Name Service (WINS).
We can print help information about the nbtstat command with the
/? option or without providing any option like below.
> nbtstat /?
Or we can just issue
nbtstat command like below.
We can see that the available options and their descriptions are printed.
List NetBIOS Name Table Of Given Remote Computer Name
We will start by displaying NetBIOS name table of the given computer. In this example, we will use
-a option and also provide the computer name. In this example, we will use a computer named WIN-TUEFA0TGVTB .
> nbtstat /a WIN-TUEFA0TGVTB
We can see that the following information is provided by this command.
- `Name` is the name of the computer
- `Type` is the computer name type which can be unique to the computer or a group name.
- `Status` which shows name status like `Registered`
List NetBIOS Name Table Of Given Remote IP Address
We can also print the NetBIOS name table by providing the remote computer IP address. We will use
-A option and provide the IP address of the remote system. In this example, we will use
192.168.142.129 IP address for the remote system.
> nbtstat /A 192.168.142.129
List NetBIOS Name Table Of Local Computer
We can also print the NetBIOS name table of the local computer. For this, we will use
/n option but do not provide any hostname or IP address because we will print the local system NetBIOS name table.
> nbtstat /n
List NetBIOS Content Of Local Computer
We can list NetBIOS contents of the local system or computer with the
/c option to the nbtstat command.
> nbtstat /c
Purge or Clear NetBIOS Name Cache
We may want to clear or purge the NetBIOS name cache. We will provide the
/R option which will delete all current NetBIOS name cache.
> nbtstat /R
Purge or Clear NetBIOS Names Cache Of WINS Server
We can release NetBIOS names registered with the WINS server and re-register them with the
/RR option like below.
> nbtstat /RR
Display NetBIOS Session Statistics By IP Address For Given Interval
NetBIOS is a session based protocol where we can list NetBIOS session statistics by IP address with the
> nbtstat /S
We can also specify the interval to refresh NetBIOS session statistics by adding interval value after the command. We will specify 5 seconds interval in the following example
> nbtstat /S 5