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

B.R.
satimis


See More: To find computer name/host name

Report •

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

echo %COMPUTERNAME%


Report •

#2
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;
http://en.wikipedia.org/wiki/List_o...

TIA

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

B.R.
satimis


Report •

#3
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,
Bre


Report •

Related Solutions

#4
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

B.R.
satimis


Report •

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

Report •

Ask Question