Hone

Lessons · Network switches · reading the prompt

The prompt is telling you where you are

The text before the cursor names the switch and the mode: CORE1> is user, CORE1# is privileged, CORE1(config)# is configuration, and CORE1(config-if)# is inside one interface.

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

Half of switching is knowing which of the five prompts you are looking at. It is free information printed on every single line, and beginners read straight past it.

How to think about it

Before typing, read the part in brackets. No brackets means you are not changing anything. (config-if)# means everything you type lands on one port, and getting that port wrong is how the right command reaches the wrong desk.

Worked example

enable
CORE1#, or Switch# on a box nobody has named.
configure terminal
Switch(config)#. The brackets appear the moment changes become possible.
interface gi0/5
Switch(config-if)#. You are now inside one port and the prompt does not say which one, which is exactly why the next habit matters.
description desk 12
The change lands on gi0/5 and nowhere else. If you thought you were on gi0/6, nothing warns you.
end
Back to Switch#, out of every level at once.

Your turn

Leave interface configuration and go all the way back to the # prompt.

The trap

Reading (config-if)# and assuming which interface. The prompt says you are in one; it never says which one. `show running-config` or scrolling up is the only way to be sure.

Practise reading the prompt on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.