Whenever we remotely access a device across a network via the CLI, the quickest way to determine whether we have logged on to the correct device is by its hostname. Each device on the network should have a unique hostname with part of its name able to identify that particular device and/or location.
The hostname can be changed from the global configuration mode, this mode affects the appliance globally. We can enter the global configuration mode from the privilege mode by using the configure terminal command.
Using the hostname command, we can set a hostname of our choosing. Please be sure not to include any spaces in the actual hostname:
ciscoasa# configure terminal
ciscoasa(config)# hostname ASA-1
ASA-1(config)#
As we can see in the preceding image, once we entered the hostname ASA-1 command, the default hostname changed immediately and we are presented with a new line, using ASA-1 as the new hostname.