show cli history

To display the command history, use the show cli history command.

show cli history [ lines ] [ unformatted ]

Syntax Description

lines
(Optional) Last number of lines from the end of the command history.
unformatted
(Optional) Displays the commands without line numbers or time stamps.

Command Default

Displays the entire formatted history.

Command Modes

EXEC mode

Command History

Release
Modification
4.0(0)N1(1a)
This command was introduced.

Examples

This example shows how to display all of the command history:

switch# show cli history
 

This example shows how to display the last 10 lines of the command history:

switch# show cli history 10
 

This example shows how to display unformatted command history:

switch# show cli history unformatted
 

Related Commands

Command
Description
clear cli history
Clears the command history.