This command works on both routers and switches.
Router(config)#hostname Cisco
Name can be any word you choose
Cisco(config)#