Cisco IOS includes a set of keyboard shortcuts and CLI techniques that significantly speed up device configuration and navigation. This content covers partial command entry, mode shortcuts, inline command execution, and console logging control.
Cisco IOS Shortcuts
Next is some commands and some things you can do on your Cisco IOS that are going to save you a ton of time. Here are some shortcuts about the Cisco equipment and how you can navigate Cisco's IOS much easier.
I've got the switch pulled up, and the first one I'm going to cover is Ctrl+Z or Ctrl+C. If you hit Ctrl+C or Ctrl+Z, it's going to bring you back to the privileged EXEC mode, even if you're buried through many different sub-modes within there.
Let me just give you an example. As a simple way of doing this, I'm going to jump into the global configuration mode, so I'm going to type in configure terminal. I'm in the global configuration mode, I hit Ctrl+C, and it brings me back. Then here I'm back in the global configuration mode, and I'm going to hit Ctrl+Z, and it brings me back. So those are two that can bring you back to that privileged EXEC mode.
Another is that I don't actually have to type out the full command. Let's say I'm going into the global configuration mode. I don't need to type in configure terminal, I don't need to type in the whole thing. What I'm going to do is type in a partial command — maybe I do conf and then hit tab, and it auto-fills the rest of the word out for me. And for terminal I type in term, and then once again it fills out the rest of the word.
One question you might ask is how many letters do I need to type in before the tab works and it auto-fills it out. The answer to that is: as many as it takes to make it a unique command. I'll show you what I mean by that.
I'm going to clear this out first of all, and I'm just going to type in how many commands start with c. So c and then question mark, and it's going to show me all the commands that start with c. I notice that configure is in here, of course, and it is a con — but so is connect. So three letters is not enough for the Cisco IOS to know what you're trying to say. For this particular one, four letters is, so I can actually just type in conf and it knows, when I hit tab, to fill in the rest of it.
Then I have terminal. How many of the commands here start with t? I hit the t, question mark, and I see it's only terminal. So all I really need to do here is just have a conf, have the t, and then I hit tab and it's all going to auto-populate, auto-fill the rest of that, and then I can hit enter. Then I go in there, and I'm going to hit Ctrl+Z to go back again, and I'm back again.
So I can use the tab to auto-fill a command — and actually I don't even need to use the auto-fill. What I can actually do, rather than typing out conf and then hitting tab, is just leave it as conf; and rather than typing out terminal, or hitting t and pressing tab, I just do t. Then I hit conf t and now I'm in the global configuration mode. That is a shortcut: I can hit the tab in order to auto-fill it in, or I could just leave it as long as it's enough characters to specify one and only one command. The Cisco IOS — the device — is going to know exactly what it is that you're trying to type.
I've kind of jumped in and out of these, so let me go back. I'm going to hit Ctrl+Z here, I'm going to go back, and I'm going to do a command I had earlier. I'm going to show the running config, so it's going to populate this out with running config.
This is stemming from one of my earlier videos where I kept hitting the up key and then I'd hit the backspace key to go earlier and change something. This is a shortcut for if you basically want the same command every time but you want to make little variations, little changes with it. You can bring that command back, use that history to bring that command back up. I use the up arrow, and then you can use the left and right arrows to scroll through that line and edit that line. For instance, maybe I want to delete the word begin and say include instead — I can do that.
That is using the arrow keys to go back and forth through this line. You can also use Ctrl+B and Ctrl+F to do the same thing: Ctrl+B goes back, Ctrl+F goes forward. I also can use Ctrl+A to go to the beginning of the line, or Ctrl+E to go to the end of the line, so I can scroll right to the beginning of the line or right to the end of the line. That's the Ctrl+A and Ctrl+E.
I don't really need this command, so I'll get rid of it. In that, I executed this command and I did it within the privileged EXEC mode, because it's a privileged EXEC mode command. A lot of the show commands — if not most of the show commands — are.
But let's say I'm in the configure terminal, so I'm in the global configuration mode, and let's say that I want to do a show command. So I do a show running-config, I hit enter, and it has a problem with this. It has a problem because show running-config is not a command that can be done in the global configuration mode.
Another shortcut with this is to append the word do in front of this. The word do allows us to execute a command in the higher modes, that it would be in the privileged EXEC mode. So this show running-config is a privileged EXEC mode command; it doesn't work in the global configuration mode. I append the word do to it, and now I hit enter, and now it does it. This can save you a ton of time, rather than having to go back to that privileged EXEC mode every time to run these show commands. You can do it from anywhere else in those sub-modes.
One other command that I'm going to explain, but I'm not going to actually demo, is Ctrl+Shift+6. Ctrl+Shift+6 actually breaks the sequence. Let's say you've typed something in and your router, or your device, is doing something and you need to stop it from doing whatever it's doing — that's what Ctrl+Shift+6 is.
Sometimes what will happen is you'll type in a word and it doesn't recognize it as a command, so it thinks that you're trying to look up a DNS record, and it will go out and start trying to look for that DNS record. Then you say, no, that's not what I wanted — Ctrl+Shift+6 will break that. Or let's say you're in the middle of a traceroute or a ping and you realize you need to either change this, or you've got the information that you need and you need to break out of this. Ctrl+Shift+6 will break you out of that sequence. So that's another thing that can help you out.
Those are just a few shortcuts that can really help you out along the way and make your job at programming these devices much easier.
This next one that I'm going to cover is really not a shortcut, but it's something that's annoying that I find, and that is that sometimes the information will be spit out onto your screen and it will mess up your commands. I'll show you what I mean. If I go into the global configuration mode and then I exit out of this, it's going to pop up with a little information on what has happened. Various things on the router will show up with some sort of log onto your console.
Now this is okay, it doesn't hurt anything, there's nothing wrong with what it's displaying. But the problem is that sometimes, if you're typing out a command, your command ends up getting on several lines. If you were to hit enter, it doesn't affect the way your device functions — it's still going to execute the command just fine. It's just that it's hard for me to determine what commands I've typed in when it starts getting split up like that.
So let's cover how to turn these off, and how to turn them back on in case you actually want to have this logging show up on your console. By default this is on, so I'm going to go into the global configuration mode and I'm going to type in no logging console. What that will do is those logs are not going to be presented on the console — and I'm on the console right now. So now when I hit exit, it doesn't show up.
And it's real simple: if I decide later on that I want to be able to see those logs and I want them to display, then I can just go into, once again, the global configuration mode and then type in logging console, hit enter, and now it's turned back on. So if I exit out of that, it's going to show up again.
This shows a lot of different types of information. That's why you may want to have it on, for things like troubleshooting. But for the purposes here it just doesn't really work well with my demo, so I'm going to keep it off here, and you can choose whether you want it.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →