Hostname

See Also

Applies To: Windows Server 2003 R2,Windows 7,Windows Server 2003,Windows Vista,Windows XP,Windows Server 2008,Windows Server 2008 R2

Hostname

Displays the host name portion of the full computer name of the computer.

Syntax

hostname

Parameters


Remarks
Examples

To display the name of the computer, type:

hostname

Formatting legend

Format

Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

See Also

Command-line reference A-ZCommand shell overview