History Size Command on CISCO Router/Switch


History Size


Sets the amount of previous commands stored in the session history. These commands can be viewed by pressing the up arrow key.


Router(config-line)#history size <0-256>


In the example below, the history size is set for the console.

R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#line con 0
R2(config-line)#history size 15

Here, the running config for the console is shown with the newly set history size.

R2(config-line)#do show run | sec con
Building configuration…
Current configuration : 1461 bytes
line con 0
exec-timeout 15 50
privilege level 15
logging synchronous
history size 15