[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.

  • dcuniverce34

    u suck

    • your mom

      but only if you ask nicely. which you didn’t so you lose.

  • Chandan

    Very useful

  • Kanishk

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

  • navneet

    thank you for the information.

  • [email protected]

    thank u i can finally hack the school


      Teach me?

  • oyzlam

    thank you very helpful specially with the pics

  • Manikandan S

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

    • Macadamia

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

      • CommandlineGuy

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

  • test


  • Steve

    thanks whore

  • Theolord

    thank you very much

  • Prasad

    Thanks its really helped me… thank u again….

  • Macadamia

    Windows Logo Key + Pause Key

  • Dummy

    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.