Skip to main content
  1. Router and Switch Articles/
  2. IOS-XE/

IOS XE Save Configuration (copy running-config startup-config)

Table of Contents

How to Save the Configuration on Cisco IOS XE

On IOS XE, configuration changes such as hostname take effect immediately in the running-config, but the running-config only exists in memory and is lost on reboot. To keep the configuration after a reboot, you need to copy (save) the running-config to the startup-config.

Cisco IOS XE Save Configuration
copy running-config startup-config

When executed, you’re prompted to confirm the destination filename. Press Enter to save to the default startup-config.

Save Configuration Example

Save Configuration Example
IOS-XE#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
IOS-XE#

About the write memory Command

write memory (shortened to wr) can also be used to save to the startup-config. It’s a shorthand command that performs the same action as copy running-config startup-config.

write memory Command
write memory
write memory Example
IOS-XE#write memory
Building configuration...
[OK]
IOS-XE#

Checking running-config and startup-config

You can check the configuration before and after saving with show running-config and show startup-config respectively.

show running-config / show startup-config Commands
show running-config
show startup-config

show running-config shows the currently active configuration in memory, while show startup-config shows the saved boot configuration. Before saving, the two differ, but they match after running copy running-config startup-config (or write memory).

show running-config / show startup-config Example
IOS-XE#show running-config | include hostname
hostname IOS-XE
IOS-XE#
IOS-XE#show startup-config | include hostname
hostname Router
IOS-XE#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
IOS-XE#
IOS-XE#show running-config | include hostname
hostname IOS-XE
IOS-XE#show startup-config | include hostname
hostname IOS-XE
IOS-XE#

Before saving, the startup-config still has the old hostname (Router), but after saving it’s updated to IOS-XE, matching the running-config.

Related Articles