Setting the System Prompt

By default, the router uses its hostname as the prompt; the hostname is "Router" if you haven't defined it explicitly. It's often a good idea to put other useful information in the prompt by using the prompt command. For example:

Sphinx(config)#prompt %h:%n%p

We've used three escape sequences to set the prompt to the hostname (%h), followed by the command number (%n), followed by the appropriate prompt character for the current command mode (%p). The escape sequences for the prompt command are listed in Table 3-1.

Table 3-1. Prompt variables

Escape sequence



Percent character


Hostname of the router


TTY number for this EXEC session


Prompt character: either > for user level or # for privileged level


Space character


Tab character

The no prompt command returns the router to the default prompt.

Cisco IOS in a Nutshell
Cisco IOS in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596008694
EAN: 2147483647
Year: 2006
Pages: 1031
Authors: James Boney
Simiral book on Amazon © 2008-2017.
If you may any questions please contact us: