Hone

Lessons · Network switches · the mode stack

Three rooms, and the door between them

User mode can look at a little, privileged mode can look at everything, and configuration mode is the only place anything can be changed.

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

Nearly every beginner mistake is typing a real command in the wrong room and reading the error as though the command were wrong. It is not; you are one door away.

How to think about it

Read the prompt before you type. > means look only. # means look at anything. (config)# means you are changing the box. To go in: enable, then configure terminal. To come back out: end.

Worked example

enable
From Switch> to Switch#. Nothing has changed on the box; you can just see more of it.
configure terminal
From Switch# to Switch(config)#. Now what you type changes the running configuration.
hostname CAMPUS-SW
A change, accepted, because you are in the room where changes are allowed. The prompt itself becomes CAMPUS-SW(config)#.
end
Straight back to CORE1#, however deep you were. exit goes up one level; end goes all the way out.

Your turn

From the # prompt, get into the room where the configuration can be changed.

 terminal

The trap

Typing a configuration command at the # prompt and reading '% Invalid input' as 'that command does not exist'. It exists; you are one `configure terminal` away from it.

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