How To Find Your Computer Name from the Command Prompt

The Command Prompt is a powerful tool that you can use to do literally everything on your computer. Among other complex processes, the Command Prompt allows you to create, move, delete files, and find all the important information about your computer’s components.

Although it is necessary to understand and learn the Command Prompt commands in order to use this tool for complex processes, some simple yet beneficial processes don’t require that much computing knowledge.

In some situations, you will have to know your computer’s name. For example, you will need this information if you want to connect your printer to multiple PCs.

Well, this can be done very easily by using your Command Prompt, and this article will show you how.

How to Use the Command Prompt to Find Your Computer Name

Before we start explaining different ways and commands that you can use to find your computer’s name, you need to know how to open your Command Prompt.

Simply click on Start and type “cmd” in the search bar. Hit Enter, and a small black window will appear. That is your Command Prompt.

Command Prompt

You can also open the Command Prompt by typing “run” in the search bar and hitting Enter. That will make the “Run” window appear. Type “cmd” and press Enter again.

Now that you have your Command Prompt ready for action, let’s begin with the commands.

The first command is hostname


All you need to do is type “hostname” in the Command Prompt and hit Enter. After that, your Command Prompt will display your computer’s name in the next line. Sounds pretty easy, right?

The only potential problem here is that you need to be very careful with your typing. If you make a typo, the Command Prompt won’t recognize the command and nothing will happen.

You can also use the %computername% command to get the same piece of information. Simply type echo %computername% in the Command Prompt and press Enter.

However, both commands will only display your computer’s NetBIOS name and not its full DNS name.

Getting DNS or FQDN of Your Computer

To get the full DNS or Fully Qualified Domain Name (FQDN) of your computer, use the following commands:

full Computer name

net config workstation | findstr /C: “Full Computer Name


wmic computersystem get name

Type one of these commands exactly as it is shown and then hit Enter. The Command Prompt will show the full DNS name of your computer.

Other Valuable Information You Can Get from the Command Prompt

Your Computer’s IP Address

Another very important piece of information that you might need is your computer’s IP address. Of course, the Command Prompt can help you with this as well.

The following steps will help you find your computer’s IP address in no time:

  1. Open the Command Prompt.
  2. Type in ipconfig
  3. Hit Enter.
  4. Look for “IPv4 Address”.


If you are using a VPN (virtual private network) for your work, you will have more information under the IPv4 Address.

Your Business Domain Server’s IP Address

Yet another interesting command that you might want to use is “nslookup”. This command allows you to find your business domain server’s IP address.

All that you need to do is type nslookup, hit Space, and add your business domain. For example, you can use this command on YouTube: nslookup

IP Addresses Between Your Computer and Your Website

Type tracert in your Command Prompt, press the Space key, and enter the website that you want to visit (or any website of your choosing). After hitting Enter, the Command Prompt will print all server IP addresses between your computer and the website that you have entered.

For example, you can type tracert to find the IP address of all the servers that “stand” between you and YouTube.

Start Using the Command Prompt

As you can see, your computer’s Command Prompt is a versatile tool that you can use for a variety of tasks. Although these few commands are considered very basic and fundamental, they are a good starting point for those who want to learn more about using the Command Prompt.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.

Todays Highlights
How to See Google Search History
how to download photos from google photos