[Quick Tip] How To Find Computer Name Using Command Prompt

Ads by Google

Here’s a quick way to find out your computer’s name, something you might need often (like, when you are trying to connect a printer to multiple PCs). This method makes use of the command prompt in Windows.

Click on the start button, type cmd in the search box (In windows XP and older version, open run command, type “cmd” and press enter). Click on the result.

command prompt windows

A command prompt window will open up. Type the word “hostname” and press enter.

cmd-hostname windows

Your computer name will appear. In my case it is “Himanshu-PC”.

cmd-computer name

This way you can easily find your computer’s name. Simple and quick.

Get Guiding Tech articles delivered to your inbox.

We will never share your address. Unsubscribe at any time.



Post a Comment or Discuss at Guiding Tech Forums

Show archived comments (17)

Archived Comments

  1. dcuniverce34 says:

    u suck

  2. Chandan says:

    Very useful

  3. Kanishk says:

    Fo you maintain directory of all computers along with host name. I wonder if my computer name is there

  4. navneet says:

    thank you for the information.

  5. [email protected] says:

    thank u i can finally hack the school

  6. oyzlam says:

    thank you very helpful specially with the pics

  7. Manikandan S says:

    Thanks for your valuable information. How to i get domain-name
    from command prompt?

    • Macadamia says:

      Windows Logo Key + Pause Key and you will see the control panel with all information you need.

      • CommandlineGuy says:

        Yes but that is via the GUI which is not the way a real Man (or Woman) use a computer, period.

  8. test says:

    thanks

  9. Steve says:

    thanks whore

  10. Theolord says:

    thank you very much

  11. Prasad says:

    Thanks its really helped me… thank u again….

  12. Macadamia says:

    Windows Logo Key + Pause Key

  13. Dummy says:

    Thanks for this util! You can also use %COMPUTERNAME% which is somewhat easier to use in batch files. On the other side, it could be spoofed so be careful.