History command on Cisco device

Cisco IOS stores or record commands that we have entered. This is called command history and it is very useful for recalling long and complex command.

By default, switch stores or record last 10 commands that we have entered.

We can change number of commands switch record for a current session or for all sessions

Steps for changing command history for a current session
Step 1 Move into privileged mode
Step 2 Use command terminal history size count
count range : 0 to 256

Switch# terminal history size ?
<0-256> Size of history buffer
Switch#terminal history size 5
Switch# show history
show logging
show clock
show ip int brief
show clock
show history

Steps for changing commands record for all session
Step 1 Move into line configuration mode
Step 2 Use command history size count
count rang e: 0 to 256

Switch# configure terminal
Switch(config)#line vty 0 4
Switch(config-line)#history size ?
<0-256> Size of history buffer
Switch(config-line)#history size 5

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s