Windows 10 Tip: 8 Command Lines to Find Your Computer Name

Windows already have a few built-in GUI-based tools that you can use to find the name of your computer, i.e. System in Control Panel and System Information tool. But what I am about to show is a number of built-in command-lines, 8 more precisely, that you can also use to reveal the same information as well. Check it out.

unnamed file 618

Read More

1. Ping

Simply Ping the localhost in the Command Prompt and you will see the computer name right in the output.

ping localhost

unnamed file 619

2. Hostname

As the name implies, the only thing this command returns is the name of your computer.

unnamed file 620

3. IPConfig

Run the command with /all switch, you will see the computer name in the beginning of the output.

unnamed file 621

4. WhoAmI

The command returns the username along with the computer name. If you want to know more about this computer, check out this post.

unnamed file 622

5. Net User

The command returns a list of user accounts on your computer but it also includes the computer name in the output as well.

unnamed file 623

You can also use net localgroup as well to get the same information.

6. Echo

That’s right, the command echo can also give away your computer name in a blink.

echo %computername%

unnamed file 624

7. Set

The command Set returns the full list of environment variables available in the system, one of them on that list, %computername%, is the one we just used in the above command.

unnamed file 625

8. Tracert

Last but not least, tracert localhost returns the name of your computer in the output.

tracert localhost

unnamed file 626

That’s all I can think of for the moment. If you can think of anything, feel free to share.