What is the “do” command?

sVeryfication commands, such as the show command, are entered in user EXEC mode or privileged EXEC mode. After setting up something, if you try to verify it with the show command, you have to switch modes. It’s not easy to change the mode every time you try to do so.

So, the do command allows you to execute EXEC commands such as the show command from the configuration mode.

Example of the do command

As an example, let’s say you have configured an IP address for an interface and then you want to check the IP address. You can check the status of the interface by typing “do show ip interface brief” while you are in interface configuration mode.

R1(config)#interface loopback 0
R1(config-if)#ip address
R1(config-if)#do show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0     YES manual up                    up
Loopback0             YES manual up                    up

Note that the completion by [TAB] is not effective after the do command. You can enter the command in an abbreviated form.

Cisco Basic