Hone

Lessons · Network switches · the four questions at any console

Four questions answer almost everything

Where am I. What has this box got. What did I change. Did I save it. Nearly every moment of confusion at a console is one of those four, unasked.

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

Most commands that get refused are the right command in the wrong mode, and the prompt was telling you the whole time.

How to think about it

The prompt answers the first for free. The other three are one command each, and none of them changes anything.

Worked example

enable
Where am I: the prompt goes from > to #, so this is privileged mode.
show version
What has it got: model, serial, ports, and the image it booted.
configure terminal
Now the prompt says (config), which is the answer to the first question again.
hostname CLOSET-3
A change.
end
Back out.
show running-config | include hostname
What did I change: this is the live one.
show startup-config
Did I save it: no, and the refusal says so plainly.
copy running-config startup-config
Now yes.

Your turn

Ask the box what hardware and software it is.

show 

The trap

Answering 'did I save it' by reloading to see. That answers the question by destroying the evidence.

Practise the four questions at any console on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.