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 Sphinx(config)#exit Sphinx:5#
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.
Escape sequence |
Meaning |
---|---|
%% |
Percent character |
%h |
Hostname of the router |
%n |
TTY number for this EXEC session |
%p |
Prompt character: either > for user level or # for privileged level |
%s |
Space character |
%t |
Tab character |
The no prompt command returns the router to the default prompt.