One of the most annoying things I kept doing when I started out in Cisco, was constantly typing ‘show’ commands when in the wrong level of the configuration.
By default, Cisco only allows you to do a ‘show’ command when you are in privileged mode (AOIP.ORG#). This can be frustrating when you are multiple levels deep and just want to see something quickly and don’t want to exit all the way back to the first level to use the ‘show’ command and then get back to the level you were in. Luckily, Cisco introduced the ‘do’ command which can be run from any level of the command line.
For example, if I have just configured an IP address on an interface and no shut the interface, the router would not allow me to type “show ip interface brief” from the interface level, however from the interface level I would be able to type “do show ip interface brief”. This would allow me to remain in interface level, have a quick look to see if my interface has gone “up up” and continue with my configuration.
Below is a live demo of trying to do the “show run” command from global configuration mode. You will see I receive an error when trying to use the ‘show’ command from this level, but with ‘do show run’ the command works.