The command line: user, privileged and configuration modes

Talking to a router

A router has no screen. You manage it through its command line, usually over a console cable when it is new, and later over the network with SSH. The command line has modes. Each mode allows different commands, and the prompt tells you where you are:

PromptModeWhat you can doHow you get there
Router>User EXECLook at a few things (ping, some show commands)You start here
Router#Privileged EXECSee everything, save, reload, run all show commandsenable
Router(config)#Global configurationChange settings for the whole deviceconfigure terminal
Router(config-if)#Interface configurationChange one portinterface g0/0
Router(config-line)#Line configurationChange the console or remote-login linesline console 0

Moving between modes

In NetLab

▶ R1
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface g0/0
R1(config-if)#description Link to the office LAN
R1(config-if)#exit
R1(config)#end
*Mar  1 00:00:07.000: %SYS-5-CONFIG_I: Configured from console by console
R1#disable
  • enable takes you up to privileged mode; disable takes you back down.
  • configure terminal (people type conf t) enters global configuration.
  • exit goes back one level; end (or Ctrl+Z) jumps straight back to privileged mode.
  • A change happens the moment you press Enter: hostname R1 changed the prompt at once.

When you leave configuration mode, the router logs %SYS-5-CONFIG_I: a note that the configuration was changed from the console.

Running a show command from configuration mode

show commands belong to privileged mode. While you are configuring, put do in front to run one without leaving:

In NetLab

▶ R1
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#do show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     unassigned      YES unset  administratively down down
GigabitEthernet0/1     unassigned      YES unset  administratively down down
GigabitEthernet0/2     unassigned      YES unset  administratively down down

Common mistake: Typing show running-config inside (config)# without do gives an error. Either add do, or go back with end first.

HOME LABS COMMUNITY DASHBOARD