So, you’re ready to get your hands on some real networking gear? Excellent! For aspiring network engineers, mastering the Cisco Command Line Interface (CLI) is an absolute must. It’s the primary way you’ll configure, manage, and troubleshoot Cisco devices like routers and switches. Don’t let the black screen intimidate you; think of it as your direct line to controlling powerful networking equipment. This guide will walk you through some essential first commands to get you started on your CLI journey.
Connecting to a Cisco Device
Before you can enter any commands, you need to establish a connection to your Cisco device. The most common method for initial configuration is using a console cable.
- A console cable typically has a USB connector on one end (to connect to your computer) and an RJ-45 connector on the other end (to connect to the console port of the Cisco device).

- You’ll need a terminal emulation program on your computer (like PuTTY for Windows or macOS Terminal). You’ll configure this program with specific settings (usually: Baud Rate: 9600, Data bits: 8, Parity: None, Stop bits: 1, Flow Control: None) to communicate with the Cisco device.
Once connected, you’ll likely see a prompt like Router>
or Switch>
. This is the User EXEC mode.
Navigating the CLI: Modes of Operation
The Cisco CLI has different modes, each with its own set of commands. Think of them as different levels of access.
- User EXEC Mode (
>
prompt): This is a limited view. You can execute basic commands to view system information and connect to other devices, but you can’t make configuration changes. To enter this mode, just connect to the device via console. - Privileged EXEC Mode (
#
prompt): This mode allows you to view the entire system configuration and enter configuration commands. To enter privileged EXEC mode from User EXEC mode, use the command:enable
You might be prompted for an enable secret password. - Global Configuration Mode (
(config)#
prompt): This is where you make global configuration changes to the device. To enter global configuration mode from Privileged EXEC mode, use the command:configure terminal
or its shorthand:conf t
- Interface Configuration Mode (
(config-if)#
prompt): Used to configure specific interfaces (like Ethernet ports). To enter this mode from Global Configuration mode, use the command:interface <interface type> <interface number>
For example:interface GigabitEthernet 0/0
- Line Configuration Mode (
(config-line)#
prompt): Used to configure console, auxiliary, or VTY (virtual terminal) lines. To enter this mode from Global Configuration mode:line console 0
(for the console port)line vty 0 4
(for the first 5 virtual terminal lines)
Essential First Commands
Here are some basic commands you’ll use frequently:
When you enter the show version
command on a Cisco device, you’ll see a wealth of information about the system. Here’s a typical example:
Cisco IOS Software, C880 Software (C880-DATA-M), Version 15.0(1)M4, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2010 by Cisco Systems, Inc.
Compiled Tue 14-Sep-10 05:43 by prod_rel_team
ROM: System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)
Router uptime is 3 weeks, 5 days, 2 hours, 17 minutes
System returned to ROM by reload
System image file is “flash:c880-data-m-mz.150-1.M4.bin”
Last reload reason: power-on
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery, transfer or use in a manner that could violate
applicable laws is prohibited.
cisco 881 (MPC8272) processor (revision 1.0) with 249856K/51200K bytes of memory.
Processor board ID FTX1234A56B
5 FastEthernet interfaces
4 Gigabit Ethernet interfaces
1 Virtual Private Network (VPN) Module
Flash memory is configured for system bootup.
247040K bytes of ATA CompactFlash (Read/Write)
Configuration register is 0x2102
Key information you can gather from this output:
- Cisco IOS Software, Version…: The specific IOS version running on the device (here, 15.0(1)M4).
- Router uptime: How long the device has been running since the last reboot.
- System image file: The name of the IOS image file stored in flash memory.
- Last reload reason: Why the device was last restarted.
- cisco 881 processor…: The model of the router and its processor information, including memory.
- Processor board ID: A unique identifier for the device.
- Interfaces: The number and types of network interfaces available on the device.
- Flash memory: The size of the flash memory where the IOS image and configuration files are stored.
- Configuration register: A setting that controls how the router boots up.
The show running-config
command displays the current configuration that the Cisco device is actively using. The output can be quite lengthy, depending on how the device is configured. Here’s a snippet illustrating some common sections:
!
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RouterA
!
boot-start-marker
boot system flash:/c880-data-m-mz.150-1.M4.bin
boot end-marker
!
enable secret cisco123
!
interface FastEthernet0
no ip address
shutdown
!
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
shutdown
!
line con 0
exec-timeout 0 0
password cisco
login
!
line aux 0
!
line vty 0 4
password cisco
login
!
end
show startup-config
: Displays the configuration that is saved in NVRAM (Non-Volatile Random Access Memory). This is the configuration the device will load when it boots up.
copy running-config startup-config
: Saves the changes you’ve made in the running configuration to the startup configuration. This ensures your changes persist after a reboot. The shortcut is copy run start
or wr mem
.
hostname <your_hostname>
(in Global Configuration Mode): Changes the hostname of the device. This makes it easier to identify your devices.
enable secret <your_secure_password>
(in Global Configuration Mode): Sets a strong, encrypted password for accessing Privileged EXEC mode.
interface GigabitEthernet 0/0
(in Global Configuration Mode): Enters the configuration mode for the GigabitEthernet 0/0 interface.
ip address <ip_address> <subnet_mask>
(in Interface Configuration Mode): Assigns an IP address and subnet mask to an interface. For example: ip address 192.168.1.1 255.255.255.0
.
no shutdown
(in Interface Configuration Mode): Enables an interface. By default, many interfaces are administratively down.
description <a_helpful_description>
(in Interface Configuration Mode): Adds a description to an interface, making it easier to understand its purpose.
exit
: Moves you one level up in the CLI modes.
end
: Returns you directly to Privileged EXEC mode (#
).