Understanding Command Modes
The Cisco IOS user interface is divided into different modes. The commands depend on which mode you are currently in. Enter a question mark (?) at the system prompt to obtain a list of commands for each command mode.
When you start a session on the router, you begin in the user mode, often called user EXEC mode. Only a limited subset of the commands are available in user EXEC mode. For example, most of the user EXEC commands are one-time commands, such as show commands, which show the current configuration status, and clear commands, which clear counters or interfaces. The user EXEC commands are not saved when the router reboots.
To gain access to all the commands, enter privileged EXEC mode. You need to enter a password to enter privileged EXEC mode. From this mode, you can enter any privileged EXEC command or enter global configuration mode.
Using the configuration modes (global, interface, and line), you can make changes to the running configuration. When you save the configuration, these commands are stored and used for router reboots. To access the various configuration modes, you must start at global configuration mode. From global configuration mode, you can enter interface configuration mode and line configuration mode.
Table 1 describes the main command modes, how to access each one, the prompt you see in that mode, and how to exit the mode. The examples in the table use the hostname Router .
For more detailed information on the command modes, see the command reference guide for this release.
Command Mode |
Access Method |
Router Prompt Displayed |
Exit Method |
About This Mode |
---|---|---|---|---|
User EXEC |
Log in. |
Router> |
Use the logout command. |
Use this mode to:
|
Privileged EXEC |
From user EXEC mode, use the enable command. |
Router# |
To go to user EXEC mode, use the disable , exit , or logout command. |
Use this mode to verify commands that you have entered. Use a password to protect access to this mode. |
Global configuration |
From the privileged EXEC mode, use the configure terminal command. |
Router (config)# |
To go to privileged EXEC mode, use the exit or end command, or press Ctrl-Z . |
Use this mode to configure parameters that apply to the entire router. |
Interface configuration |
From the global configuration mode, use the interface command (with a specific interface). |
Router (config-if)# |
To go to global configuration mode, use the exit command. To return directly to privileged EXEC mode, press Ctrl-Z . |
Use this mode to configure parameters for the Ethernet ports. |
VLAN configuration |
While in global configuration mode, enter the vlan vlan-id command. |
Router(config-vlan)# |
To go to global configuration mode, enter the exit command. To return to privileged EXEC mode, press Ctrl-Z or use the end command. |
Use this mode to configure VLAN parameters. |
Line configuration |
While in global configuration mode, specify a line by using the line vty or line console command. |
Router(config-line)# |
To go to global configuration mode, use the exit command. To return to privileged EXEC mode, press Ctrl-Z or enter end . |
Use this mode to configure parameters for the terminal line. |