The commands for moving back and forth on the command line are pretty self-explanatory. However, some of the commands listed in Table 1 are especially useful. For example, the up and down arrows allow you to scroll through previous commands, much like you might be familiar with from the Windows or Linux command line.
If you do choose to scroll through commands regularly, you may want to control how many commands are stored in the router’s command history. Conversely, you might feel that the command history feature represents a security threat – another user could easily view recently issued commands if you were to step away from the router momentarily without logging off. In that case, you can also turn the command history off.
Configuring terminal history settings can be accomplished from both user mode and privileged mode. By default, the command history feature is enabled, and is set to show the last 10 commands entered. To verify this, use the show terminal command. I’ve eliminated most of the command’s output in the example below to show only the data relevant to terminal history settings.
History is enabled, history size is 10.
In order to actually view the command history, use the show history command:
show int e0
show int s1
show int s0
You can also set the command history to a larger or smaller size. To set the command history to buffer the last 20 commands issued, use the terminal history size command.
toronto-1>term his size 20
Notice that in the example above, I entered shorthand versions of the first two parts of the command. Instead of entering terminal history size 20, I simply truncated it to a shorter version that still provided enough information to not be considered ambiguous by the router.
Finally, if you want to turn the terminal history feature off, enter the command:
toronto-1>terminal no history
Terminal history can easily be re-enabled by issuing the command terminal history.