How To: Get Computer Name Using the Command Prompt (Windows)

Question

How do I get my computer name using the Command Prompt in Windows?

 

Answer

1. Open Windows Search by pressing Windows + S keys simultaneously.

Windows key plus S key.

 

2. In the Search box, type cmd.

Windows Search bar with "cmd"

 

3. At the Command Prompt, type hostname.  The Computer Name will be displayed.

Command Prompt window with hostname

 

4. To copy Computer Name to Clipboardclick and drag mouse over Computer Name to highlight. 

Command Prompt window with computer name highlighted

 

5. Copy Computer Name to Clipboard by pressing Control + C keys simultaneously.

Control key plus C key

 

6. To close Command Prompt window, type exit.

Command Prompt window with hostname and exit

Print Article

Related Articles (6)

Step-by-step process for accessing Software Center in Mac OS.
Step-by-step process for retrieving computer name from Software Center in Mac OS.
Step-by-step process for retrieving computer name from Software Center in Microsoft Windows.
Step-by-step process for retrieving computer name via Terminal in Mac OS.
Step-by-step process to uninstall or remove self-service software from Software Center in Microsoft Windows.
Step-by-step self-service software installation using Software Center in Microsoft Windows.