To find computer name/host name

July 17, 2010 at 19:44:17
Specs: Linux i686, AMD 955
Hi folks,

Win 7

How to display computer name/host name on Command Prompt. "ipconfig /all" can show it but I have to read all output. Is there an option/a flag only to display it. TIA


See More: To find computer name/host name

July 17, 2010 at 20:47:27
This should work:


Report •

July 18, 2010 at 03:00:09
Hi LMiller7,

Thanks for your advice which works for me here.

Both %COMPUTERNAME% and %computername% generate the same output.

What will be other uses of "echo" command in Windows OS other than listed on;


This command looks similar to the "echo" command in Linux/Unix


Report •

July 18, 2010 at 14:27:49
You can type SET in a command window to find all the system variables you can use. You can also make your own, which I find is an easy way to save quick data in a batch file.

Just a thought,

Report •

Related Solutions

July 18, 2010 at 18:16:37
Hi Brecalmor,

Thanks for your advice. Still I have to reading all output to find computer/host name. Is there a DOS command similar to the pipe command || in Unix and a command (grep in Unix) to screen the target? TIA


Report •

December 21, 2010 at 17:27:45
C:\>HOSTNAME will give you the computer name.

Report •

Ask Question