Microsoft DOS hostname command

Updated: 11/13/2018 by Computer Hope

About hostname

Display the hostname of the machine that is running the command.

Availability

The hostname command is an external command and is available in the below Microsoft operating systems as hostname.exe.

Hostname syntax

hostname [/?]

Hostname examples

hostname

Display the hostname for the computer.

hostname /?

Display a help message.

Additional information

  • See our hostname definition for further information and related links on this term.