Cisco Certified Network Associate (CCNA) Practice Exam

Disable ads (and more) with a membership for a one time $2.99 payment

Study for the Cisco Certified Network Associate (CCNA) exam with our comprehensive quiz featuring multiple-choice questions and detailed explanations. Prepare effectively and enhance your understanding of networking concepts!

Practice this question and more.


Which command is used to set the hostname on a device?

  1. (config)#hostname HOSTNAME

  2. (config)#set device name HOSTNAME

  3. (config)#name HOSTNAME

  4. (config)#device-name HOSTNAME

The correct answer is: (config)#hostname HOSTNAME

The command to set the hostname on a Cisco device is indeed derived from the first option. The syntax you are using is correct: by entering "(config)#hostname HOSTNAME" in the configuration mode, you can effectively change the device's hostname to the desired value. Setting the hostname is an important step in network device configuration as it helps in the easy identification of devices in the network. This hostname will appear in the command prompt and can be essential for administration and troubleshooting. The other potential commands listed do not follow the correct syntax used in Cisco devices. For example, the use of "set device name" or simply "name" does not align with Cisco’s command structure, and "device-name" is not recognized as a valid command in the configuration context. Therefore, the first option is the correct one for setting the hostname on a Cisco device.