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%pSphinx(config)#exitSphinx: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.
Table 3-1. Prompt variables
|
Escape sequence |
Meaning |
|---|---|
|
|
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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access