Cloud Training (Online)

3 Ways to Find the Computer Name from Command Line in Windows 10

One of the easiest way to find the name of the computer is by using the System screen available in the Control Panel. (Control Panel\All Control Panel Items\System).


You could also use the command prompt to find the computer name in Windows 10.

3 Ways to Find the Computer Name from Command Line in Windows 10

1. Using the command “hostname”

You can use the hostname command to find out the name of the computer. This prints only the NetBios name of the PC.

c:\> hostname

2. Using %computername% along with the echo command

The environment variable %computername% contains the name of the system. Below is how you will use the %computername% to get the name of the system

c:\>echo  %computername%

3. Fully Qualified Domain Name using the net config command

c:\net config workstation | findstr /C:”Full Computer name”
Full Computer Name senthil-pc

Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.