H Commands

This chapter describes the basic Cisco NX-OS system commands that begin with H.

hostname

To configure the hostname for the device, use the hostname command. To revert to the default, use the no form of this command.

hostname name

no hostname

 
Syntax Description

name

Name for the device. The name is alphanumeric, case sensitive, can contain special characters, and can have a maximum of 63 characters.

 
Defaults

switch

 
Command Modes

Global configuration mode

 
Supported User Roles

network-admin
vdc-admin

 
Command History

Release
Modification

7.3(0)N1(1)

This command was modified. The character limit of a hostname is increased from 32 to 63 alphanumeric characters.

4.0(1)

This command was introduced.

 
Usage Guidelines

The Cisco NX-OS software uses the hostname in command-line interface (CLI) prompts and in default configuration filenames.

The hostname command performs the same function as the switchname command.

This command does not require a license.

Examples

This example shows how to configure the device hostname:

switch# configure terminal
switch(config)# hostname Engineering2
Engineering2(config)#
 

This example shows how to revert to the default device hostname:

Engineering2# configure terminal
Engineering2(config)# no hostname
switch(config)#
 

 
Related Commands

Command
Description

show hostname

Displays the device hostname.

switchname

Configures the device hostname.