Command history
You can use the up arrow key or Ctrl+P to display the previous command in the session history, if any.
You can use the down arrow key or Ctrl+N to display the next command in the session history, if any.
You can use the
show history
command to show a numbered list of the commands executed during this session. You use the command numbers to specify commands to repeat using the
repeat
command. The
show history
and
repeat
commands are not saved in the history buffer.
The commands saved in the history command buffer are in the same format in which you entered the commands. If you enter an incomplete command, the command saved in the history command buffer is also an incomplete one.
If you execute the same command repeatedly, the switch saves only the earliest record. However, if you execute the same command in different formats, the switch saves them as different commands.
For example, if you execute the
show startup-config
command repeatedly, the system saves only one command in the history command buffer. If you execute the command in the format of
show start
and
show startup
respectively, the system saves them as two commands.