Make the "show" command available in configuration mode

I tend to forget whether I'm in configuration mode or not and often type the do command in exec mode or the show command in configuration modes. With the alias functionality you can make the show command a native command in the configuration modes; just configure alias configure show do show.

The “only” drawback of this approach is that IOS has zillion different configuration modes and you have to define the alias in each one of them (you could do it just in the most common ones … or try to remember to type the do keyword first :).

4 comments:

  1. Any thoughts on why cisco doesn't implement support for show commands from any cli node?
    Seems like a simple enough thing to do.

    ReplyDelete
  2. I'm pushing for this, don't worry.

    ReplyDelete
  3. Chinese Huayei devices in config-if mode do:
    dis this (display this)


    in cisco: "do sh run int f1/0/14"
    (if f1/0/14 was the int you are focused into)

    Why can't cisco give us that - or better ?

    ReplyDelete
  4. One problem with the "do" config command is if you are in "(dhcp-config)" mode, it'll do a "domain-name"!!! So if you try "(dhcp-config)#do dir" instead of a directory you just changed your DHCP domain name...

    Thanks for all the greqat posts.
    Cote

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.