Partilhar via


Hostname

 

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

Displays the host name portion of the full computer name of the computer. For examples of how this command can be used, see Examples.

Syntax

hostname

Parameters

Parameter

Description

/?

Displays Help at the command prompt.

Remarks

This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network.

Examples

To display the name of the computer, type:

hostname

Additional references