Configure IOS Hostname
From the privileged EXEC mode, access the global configuration mode by entering the configure terminal command:
Switch# configure terminal
After the command is executed, the prompt will change to:
Switch(config)#
As shown in the figure, in the global configuration mode, enter the hostname:
Switch(config)# hostname Sw-Floor-1
After the command is executed, the prompt will change to:
Sw-Floor-1 (config)#
Notice that the hostname appears in the prompt. To exit global configuration mode, use the exit command.
Always make sure that your documentation is updated each time a device is added or modified. Identify devices in the documentation by their location, purpose, and address.
Note: To undo the effects of a command, preface the command with the no keyword.
For example, to remove the name of a device, use:
Sw-Floor-1 (config)# no hostname
Switch(config)#
Notice that the no hostname command caused the switch to revert to the default hostname of "Switch."
In the figure, practice entering a hostname on a switch.