Lessons · Network switches · abbreviating commands
Type less, and know exactly when you cannot
You may shorten any keyword to a prefix, as long as only one keyword in that position starts with it.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
Every real technician types `conf t` and `sh run`. Reading somebody else's notes, or watching over a shoulder, is impossible if you cannot expand the short forms in your head.
How to think about it
Shorten freely, but when the box says '% Ambiguous command' it is not being difficult: two commands genuinely start with what you typed, and it will not guess between them.
Worked example
enShort for enable. Nothing else in user mode starts with en, so it is unambiguous.
conf tconfigure terminal. Two words, both shortened, both unambiguous.
int gi0/2interface GigabitEthernet0/2. The port name is shortened too, and gi0/2, Gig0/2 and GigabitEthernet0/2 are the same port.
sw mo accswitchport mode access. This is what a switching command usually looks like in somebody's notes.
endOut.
Your turn
Get into configuration mode the way a technician actually types it.
t
Console into a switch
The trap
Assuming a short form that works here works everywhere. In interface mode `sp` is ambiguous, because both `speed` and `spanning-tree` start with it. The rule is per position, not per device.