2.1.7. history

Syntax

history <1-256> no history

Parameter


<1-256> Specify maximum CLI history entry number.


Default

Default maximum history entry number is 128.

Mode

Line Configuration

Usage

Use history command to specify the maximum commands history number for CLI running on console, telnet or ssh service. Every command input by user will record in history buffer. If all history commands exceed configured history number, older ones will be deleted from buffer. Use “no history” to disable the history feature. And use “show history” to show all history commands.

Example

This example shows how to change console history number to 100, telnet history number to 150 and ssh history number to 200.

Switch(config)# line console
Switch(config-line)# history 100
Switch(config-line)# exit
Switch(config)# line telnet
Switch(config-line)# history 150
Switch(config-line)# exit
Switch(config)# line ssh
Switch(config-line)# history 200
Switch(config-line)# exit

This example shows how show line information.

Switch# show line
Console ==============================
Session Timeout : 10 (minutes)
History Count : 100 Password Retry : 3
Silent Time : 0 (seconds)
Telnet
------------------------------------------------------------------------
Telnet Server : disabled Session Timeout : 10 (minutes) History Count
: 150
Password Retry : 3
Silent Time : 0 (seconds)
SSH
------------------------------------------------------------------------
SSH Server : disabled Session Timeout : 10 (minutes) History Count :
200
Password Retry : 3
Silent Time : 0 (seconds)

This example shows how show history commands.

Switch# show history
Maximun History Count: 100
------------------------------------------------------------------------

1.  enable
2.  configure
3.  line console
4.  exit
5.  show history
6.  line
7.  exit
8.  show history
9.  configure
10. line
11. line console
12. exit
13. line console
14. history 100
15. exit
16. show history
17. exit
18. show history