Uniqcli

Cisco IOS / IOS XE Commands Cheat Sheet for Network Admins

A working reference for the Cisco IOS XE commands that actually surface day to day, grouped by the job you are trying to finish instead of by alphabet.

UT
Uniqcli Team
May 29, 2026 · 11 min read
Share
Cisco IOS / IOS XE Commands Cheat Sheet for Network Admins

This is a working Cisco IOS and IOS XE reference laid out the way you actually use it: one table per job, commands on the left, what they do on the right. Everything here is current IOS XE syntax as it runs on today's Catalyst switching, not the classic IOS that a lot of older sheets were written against. Read the prompt before you type, verify with a show command before and after, and save your work.

CLI modes and navigation

The Cisco command line is layered, and the single biggest source of confusion for newer admins is not knowing which layer they are standing in. You land in user EXEC mode, type enable to reach privileged EXEC, run configure terminal to drop into global configuration, then step further into interface, line, or VLAN sub-modes from there. The prompt is your map: a trailing > means user EXEC, a # means privileged, and a tag like (config-if)# tells you the next command applies to a single interface and nowhere else.

CommandWhat it doesPrompt you land on
enableMove from user EXEC to privileged EXECSwitch#
disableDrop back down to user EXECSwitch>
configure terminalEnter global configuration modeSwitch(config)#
interface GigabitEthernet1/0/1Scope every following command to one physical portSwitch(config-if)#
interface range GigabitEthernet1/0/1 - 24Scope one edit to a whole block of portsSwitch(config-if-range)#
interface Vlan20Configure the switched virtual interface for VLAN 20Switch(config-if)#
vlan 20Create or edit VLAN 20Switch(config-vlan)#
line vty 0 15Configure the remote access linesSwitch(config-line)#
line console 0Configure the console portSwitch(config-line)#
router ospf 1Enter the OSPF routing processSwitch(config-router)#
exitBack out one levelOne mode up
endJump straight back to privileged EXEC from any depthSwitch#
do show ip interface briefRun an EXEC show command without leaving config modeUnchanged
?List every keyword valid at this exact point in the commandUnchanged
show ?Same context help scoped to one keyword you already typedUnchanged
TabComplete the keyword you started typingUnchanged
Ctrl-Shift-6Abort a running command such as a long ping or tracerouteUnchanged
terminal length 0Turn off paging so long output scrolls in one passUnchanged
terminal monitorSend log messages to your SSH session, not just the consoleUnchanged
logging synchronousStop console messages from mangling the line you are typingSet per line
show privilegeConfirm which privilege level you currently holdUnchanged

Show and verify essentials

Troubleshooting is mostly reading. These are the commands you run before you change anything, and the same ones you run again afterward to prove the change did what you intended. When the full running configuration is too much, pipe it: show running-config | section interface or show running-config | include vlan pulls just the part you care about out of a file that can run thousands of lines.

CommandWhat it tells you
show versionSoftware train, uptime, license level, and the reason for the last reload
show running-configThe configuration active in memory right now
show startup-configThe configuration that will load at the next boot
show running-config interface GigabitEthernet1/0/1Only the lines applied to one port, ideal for before and after checks
show running-config | section router ospfOne config section without scrolling the whole file
show ip interface briefOne line per interface: address, admin status, line protocol
show interfaces statusSpeed, duplex, access VLAN, and connect state per port
show interfaces GigabitEthernet1/0/1Full counters, errors, and drops for a single interface
show interfaces counters errorsCRC and input errors across every port at once
show vlan briefVLAN IDs, names, and the access ports assigned to each
show interfaces trunkWhich ports trunk, the native VLAN, and the allowed and forwarding lists
show mac address-tableWhich MAC address is learned behind which port
show ip routeThe routing table, with codes for connected, static, and OSPF entries
show ip arpIP to MAC bindings the device has resolved
show cdp neighbors detailDirectly attached Cisco devices with platform, IP, and software
show lldp neighbors detailThe same neighbor map in mixed-vendor environments
show spanning-treeRoot bridge, port roles, and port states per VLAN
show power inlinePoE budget and per-port power draw
show environmentTemperature, fan, and power supply health
show inventorySerial numbers and PIDs for support and warranty registration
show loggingThe buffered log the box has been quietly writing all along

Interface configuration

Configuration follows a predictable pattern once you internalize it: enter global config with configure terminal, scope down to the object you are changing, make the edit, then back out and verify that one object rather than the whole file. Every command below runs from interface configuration mode unless noted.

CommandWhat it does
interface GigabitEthernet1/0/1Select a single physical port
interface range GigabitEthernet1/0/1 - 24Select a contiguous block of ports and edit them together
description Uplink to core-sw01Label the port so the next admin knows what is on it
switchport mode accessForce the port to access mode with no negotiation
switchport access vlan 20Place the access port in VLAN 20
switchport voice vlan 110Add the voice VLAN for an IP phone sharing the port
switchport port-security maximum 2Cap how many MAC addresses the port will learn
spanning-tree portfastMove an access port to forwarding immediately at link up
spanning-tree bpduguard enableShut the port if a BPDU arrives, protecting the topology
speed 1000Pin the port speed when autonegotiation misbehaves
duplex fullPin duplex to stop late collisions on a stubborn link
power inline neverDisable PoE on a port that should never supply power
no shutdownBring the interface up
shutdownAdministratively take the interface down
no switchportConvert a switchport into a routed layer 3 interface
ip address 10.20.0.2 255.255.255.0Address an SVI or a routed port
ip address dhcpTake the management address from DHCP instead
default interface GigabitEthernet1/0/1Wipe a port back to factory defaults in one command
show running-config interface GigabitEthernet1/0/1Verify precisely what you just changed and nothing else

VLANs and trunking

CommandWhat it does
vlan 20Create VLAN 20 and enter VLAN configuration
name FINANCEName the VLAN so the next person does not have to guess
no vlan 20Delete the VLAN from the database
switchport mode accessSet the port to carry a single untagged VLAN
switchport access vlan 20Assign that access VLAN
switchport mode trunkSet the port to carry tagged traffic for multiple VLANs
switchport trunk encapsulation dot1qSelect 802.1Q tagging on platforms that ask for it
switchport trunk allowed vlan 10,20,30Restrict the trunk to exactly these VLANs
switchport trunk allowed vlan add 40Append a VLAN without retyping the whole list
switchport trunk native vlan 999Move untagged traffic off VLAN 1 to an unused VLAN
switchport nonegotiateStop sending DTP frames on a hardcoded trunk
show interfaces GigabitEthernet1/0/1 switchportPer-port view of mode, access VLAN, and negotiation state
show interfaces trunkVerify native VLAN plus allowed and forwarding VLAN lists
show vlan briefConfirm the VLAN exists and which ports are members
vtp mode transparentKeep the switch from learning or advertising VLANs over VTP
show vtp statusCheck VTP mode, domain, and revision before adding a switch
interface Vlan20Create the SVI that gives VLAN 20 a gateway
ip routingEnable layer 3 forwarding between SVIs, run in global config

Routing basics: static and OSPF

CommandWhat it doesMode
ip routingTurn on IPv4 routing on a layer 3 switchGlobal config
ip route 0.0.0.0 0.0.0.0 203.0.113.1Default route pointing at the next hopGlobal config
ip route 10.30.0.0 255.255.255.0 10.20.0.1Static route to a single subnetGlobal config
ip route 10.30.0.0 255.255.255.0 10.20.0.2 210Floating backup route with a higher administrative distanceGlobal config
no ip route 10.30.0.0 255.255.255.0 10.20.0.1Remove a static routeGlobal config
router ospf 1Enter OSPF process 1Global config
router-id 10.0.0.1Pin the OSPF router ID instead of letting it be chosenRouter config
network 10.20.0.0 0.0.0.255 area 0Advertise matching interfaces into area 0Router config
passive-interface Vlan20Advertise the subnet but form no neighbors on a user VLANRouter config
default-information originatePush the default route into OSPF for the rest of the areaRouter config
ip ospf 1 area 0Enable OSPF directly on an interface, the preferred IOS XE formInterface config
ip ospf network point-to-pointSpeed up adjacency on a routed link between two devicesInterface config
ip ospf cost 10Influence path selection on a specific linkInterface config
ip ospf hello-interval 5Tighten failure detection where both ends matchInterface config
show ip route ospfOnly the routes OSPF learnedPrivileged EXEC
show ip ospf neighborAdjacency state, which should read FULLPrivileged EXEC
show ip ospf interface briefWhich interfaces run OSPF, in which area, at what costPrivileged EXEC
show ip protocolsActive routing processes, networks, and passive interfacesPrivileged EXEC
clear ip ospf processReset adjacencies, disruptive and window-onlyPrivileged EXEC

Save, backup, restore, and recovery

The command that ends every session is the one people forget under pressure: copy running-config startup-config, or the shorthand write memory, from privileged EXEC. The running configuration is what is active right now; the startup configuration is what loads on reboot. A change that works but was never saved survives exactly until the next reload, and then it is gone.

CommandWhat it does
copy running-config startup-configSave the active configuration so it survives a reload
write memoryShorthand for the same save
show startup-configConfirm what will actually load at boot
copy running-config flash:backup-2026-05-29.cfgKeep a dated local copy on flash before an edit
copy running-config tftp:Push the configuration off the box to a TFTP server
copy tftp: running-configMerge a saved configuration back onto the device
archiveEnter the archive feature in global config
path flash:archive-configTell the archive where to store versions
archive configTake a configuration snapshot on demand
show archiveList the stored versions available to roll back to
configure replace flash:backup-2026-05-29.cfgRoll the whole device back to a known-good configuration
configure terminal revert timer 10Enter config mode with an automatic revert if you do not confirm
configure confirmConfirm the change and cancel the pending automatic revert
reload in 10Schedule a reload as a lockout safety net before a risky remote edit
reload cancelCancel that pending reload once you confirm your session survived
reload at 02:00Schedule a reload inside a maintenance window
show reloadCheck whether a reload is currently pending
dir flash:List images and saved files on flash
show bootvarSee which image the device intends to boot next
write eraseClear the startup configuration back to factory, then reload

Troubleshooting and diagnostics

CommandWhat it does
ping 10.20.0.1Basic reachability from the device itself
ping 10.20.0.1 source Vlan20 repeat 100Test from a specific SVI over a longer run
traceroute 10.30.0.5Hop by hop path toward a destination
show interfaces GigabitEthernet1/0/1Errors, drops, and counters on a suspect port
show interfaces counters errorsScan every port for CRC and input errors at once
clear counters GigabitEthernet1/0/1Zero the counters so new errors are unambiguous
show mac address-table address 0011.2233.4455Find which port a specific MAC lives behind
show spanning-tree rootIdentify the root bridge for each VLAN
show spanning-tree interface GigabitEthernet1/0/1 detailExplain why a port is blocking
show processes cpu sortedWhat is burning CPU right now
show processes memory sortedThe largest memory consumers
show loggingThe device's own account of what went wrong and when
test cable-diagnostics tdr interface GigabitEthernet1/0/1Run a TDR cable test on a copper port
show cable-diagnostics tdr interface GigabitEthernet1/0/1Read the TDR result once the test completes
monitor session 1 source interface Gi1/0/1Start a SPAN session to capture traffic from a port
monitor session 1 destination interface Gi1/0/24Send that mirrored traffic to your capture device
show monitorConfirm which SPAN sessions are configured
show debuggingList every debug currently running
undebug allStop all debugging immediately, the first thing to type if output floods
show tech-supportThe full diagnostic dump TAC will ask for on a case

Security hardening baseline

For federal, DoD, healthcare, and SLED environments, the command line is also where security controls actually land. The same CLI you use to bring up a port is where you force SSH, disable unused services, set banners, scope access with AAA, and apply the baselines an auditor will check line by line. These are small edits with outsized audit weight, and our security engineering team turns the same list into a repeatable baseline that lands identically on every device.

CommandWhat it does
enable secret <password>Store the privileged EXEC password as a salted hash
no enable passwordRemove the older, reversibly encrypted password
service password-encryptionObscure the remaining plaintext passwords in the configuration
username netadmin privilege 15 secret <password>Create a local admin account with a hashed password
ip domain-name example.govRequired before the device will generate an SSH key pair
crypto key generate rsa modulus 2048Generate the RSA key that SSH depends on
ip ssh version 2Force SSH version 2 and refuse the legacy protocol
ip ssh time-out 60Limit how long an unauthenticated SSH session can sit open
ip ssh authentication-retries 2Cut off password guessing at the service level
transport input sshAllow SSH only on the VTY lines, blocking Telnet
login localAuthenticate remote sessions against the local user database
exec-timeout 5 0Drop idle sessions after five minutes
no ip http serverTurn off the HTTP management plane when it is not required
no ip http secure-serverTurn off the HTTPS management plane on the same grounds
banner login ^C Authorized use only ^CPresent the login banner assessors expect to find
aaa new-modelSwitch the device to the AAA authentication framework
aaa authentication login default group tacacs+ localCentralize authentication with a local fallback
ntp server 10.0.0.10Trustworthy timestamps, which every log-based control depends on
service timestamps log datetime msec localtime show-timezoneMake each log line usable in an investigation
logging host 10.0.0.20Ship logs off the box to syslog or a SIEM
no snmp-server community publicRemove default read strings that should never exist
show ip sshVerify the running SSH version and key length

EtherChannel and port-channel

CommandWhat it does
interface range GigabitEthernet1/0/23 - 24Select the member ports so they are configured identically
channel-group 1 mode activeBundle the members with LACP actively negotiating
channel-group 1 mode passiveLACP that waits for the far end to start negotiating
channel-group 1 mode desirablePAgP negotiation, Cisco to Cisco only
channel-group 1 mode onStatic bundle with no negotiation, the easiest way to build a loop
interface Port-channel1Configure the logical bundle itself
switchport mode trunkApplied to Port-channel1 so every member inherits it
switchport trunk allowed vlan 10,20,30Constrain the bundled trunk to named VLANs
no channel-group 1Remove a single member port from the bundle
port-channel load-balance src-dst-ipChange the hash so traffic spreads across members
show etherchannel summaryMember state at a glance, look for the P flag on each port
show etherchannel 1 port-channelDetail for one bundle including the active protocol
show lacp neighborWhat the far end is actually negotiating
show etherchannel load-balanceConfirm which hashing method is in effect
show interfaces port-channel1Aggregate counters and throughput for the bundle

Frequently asked questions

Is IOS the same as IOS XE on current Catalyst switches?

They share most day-to-day command syntax, so classic IOS habits carry over, but modern Catalyst 9000 switches run IOS XE, which adds a Linux-based architecture, model-driven programmability through NETCONF and RESTCONF, and config-replace recovery. The commands in this reference are aimed at IOS XE.

How do I save my configuration so it survives a reboot?

Run copy running-config startup-config, or the shorthand write memory, from privileged EXEC mode. The running configuration is what is active now; the startup configuration is what loads on reboot, and any unsaved change is lost on the next reload.

What is the fastest way to check interface status?

show ip interface brief gives a one-line-per-interface snapshot of status and addressing, and show interfaces status adds speed, duplex, and the access VLAN. Both are far quicker than scrolling the full running configuration when you only need a health check.

How do I recover if a config change locks me out remotely?

Before a risky edit, schedule a safety net with reload in 10, which reloads the device in ten minutes unless you cancel it with reload cancel. On IOS XE you can also snapshot a known-good config with the archive feature and roll back instantly using configure replace if an edit goes wrong.

Which CLI commands matter most for STIG and NIST compliance?

The high-value ones disable attack surface and prove access control: transport input ssh on VTY lines, no ip http server where it is not needed, service password-encryption, login banners, and AAA configuration. These map directly to DISA STIG findings and NIST SP 800-53 control families that auditors check line by line.

When should we stop running these commands by hand?

Once you are running the same show-and-save cycle across more than a handful of devices, or chasing config drift across a campus, the by-hand model stops scaling. That is the point to move into template-driven provisioning with Catalyst Center or hand the routine cycle to a managed operations team.

UT
Written & maintained by

Uniqcli Team

The Uniqcli Team is an authorized Cisco partner specializing in Catalyst wireless, switching, datacenter fabric, licensing, and managed services for U.S. federal, state, local, and education customers. We scope Cisco bills of materials, validate procurement paths (TAA, FIPS, contract vehicles), and deliver design, deployment, and managed operations.

Ready to scope your Cisco build?

Build a quote

Related reading

Cisco Catalyst 3560V2 (WS-C3560V2-48PS-S) to Catalyst 9200 Migration GuideGuides

Cisco Catalyst 3560V2 (WS-C3560V2-48PS-S) to Catalyst 9200 Migration Guide

The WS-C3560V2-48PS-S reached Last Day of Support on May 31, 2021, no PSIRT patches, no TAC, no RMA. Here is a practical, specs-driven plan to migrate from the Fast Ethernet 3560V2 to the gigabit, IOS-XE Catalyst 9200 (C9200-48P-A).

May 13, 2026 · 7 min read
Cisco 2960-48TC-L EoL: Migrate to Catalyst 9200L 48-PortGuides

Cisco 2960-48TC-L EoL: Migrate to Catalyst 9200L 48-Port

The Catalyst 2960-48TC-L (WS-C2960-48TC-L) passed Last Day of Support on October 31, 2019. Here is why this Fast Ethernet LAN Base switch has to come out of the wiring closet, and how to refresh cleanly to the Catalyst 9200L 48-port C9200L-48T-4X-A.

June 9, 2026 · 8 min read
How to size a campus wireless deployment: APs, switching and licensingGuides

How to size a campus wireless deployment: APs, switching and licensing

Sizing a campus wireless refresh is three problems wearing one trench coat: enough APs for the RF, enough switch ports and PoE to feed them, and the right licensing to run it all. Here is how to scope each layer so the bill of materials lands once.

June 6, 2026 · 12 min read
Cisco Catalyst 9200 vs 9300 vs 9500: How to ChooseGuides

Cisco Catalyst 9200 vs 9300 vs 9500: How to Choose

The Catalyst 9000 family spans the wiring closet to the campus core. Here is how the 9200, 9300, and 9500 actually differ, and a decision framework that keeps your refresh from being over- or under-built.

May 8, 2026 · 13 min read
Cisco 1941W EoL: Migrate to Catalyst 8200 C8200-1N-4TGuides

Cisco 1941W EoL: Migrate to Catalyst 8200 C8200-1N-4T

The Cisco 1941W reached Last Day of Support on December 31, 2021, no patches, no TAC, no RMA. Here is what the EoL milestones mean and how to migrate cleanly to the Catalyst 8200 Edge Platform (C8200-1N-4T), including the licensing and wireless changes that catch teams off guard.

April 22, 2026 · 6 min read
How Much Does a Cisco Catalyst 9500 Cost?Guides

How Much Does a Cisco Catalyst 9500 Cost?

A Catalyst 9500 core switch starts from about $10,000, but licensing tier, subscription term, SmartNet, optics, and install decide what you actually pay. Here is how the real number is built.

February 17, 2026 · 9 min read