Configure the hostname in IOS
You can use the global configuration mode hostname command to configure an IOS device hostname. The hostname you specify is only locally significant, meaning that it doesn’t affect the DNS name resolution process. Generally, it is a good idea to name your device to reflect its physical location.
Here are the steps to change an IOS device’s hostname:
1. Log in to your IOS device and enter the privileged exec mode by entering the enable command. Provide the correct username and password if required:
2. Enter the global configuration mode by typing the configure terminal command (or the shortcut conf t) in the privileged exec mode:
3. To change the hostname, type the hostname command followed by the name you would like to configure. Notice how the prompt has changed: