Routing & Switching

Running Config vs Startup Config — Difference and Commands

G Gurpreet Singh May 6, 2024 5 min read
What are Running And Startup Configuration and Why it is Important

A Cisco device holds two configuration files, and confusing them is how people lose a day’s work — or lock themselves out of a router.

Running configurationStartup configuration
Stored inRAM — volatileNVRAM — non-volatile
ContainsThe configuration in effect right nowWhat will load on next boot
Changes take effectImmediately as you typeOnly after a reload
Survives a rebootNoYes
View withshow running-configshow startup-config

Every command you enter in configuration mode changes the running config and takes effect at once. Nothing you type is saved until you explicitly copy it across.

Saving

Switch# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]

Or the shorter forms, which do exactly the same thing:

Switch# write memory
Switch# wr

To go the other way — discard unsaved changes and reload the saved config — do not use copy startup-config running-config. That merges the two rather than replacing, so anything you added stays. To genuinely revert, either reload the device or use:

Switch# configure replace nvram:startup-config

Comparing Them

Before saving, it is worth knowing exactly what will change:

Switch# show archive config differences nvram:startup-config system:running-config

Or check whether there is anything unsaved at all:

Switch# show running-config | include Last configuration change

Many platforms also warn on reload:

System configuration has been modified. Save? [yes/no]:

Answering no here discards every change since the last save.

The Safety Net Every Remote Change Needs

The classic disaster: you apply an ACL or change an interface remotely, lose your session, and the device is unreachable — with the bad configuration still running.

Schedule a reload before you make the change. Because the change is only in RAM, a reboot reverts it:

Switch# reload in 10
Reload scheduled in 10 minutes

! ... make the risky change ...
! ... confirm you still have access ...

Switch# reload cancel
Switch# write memory

If you lose access, the device reboots in ten minutes back to the last saved configuration and you get in again. If everything is fine, cancel the reload and save. This costs nothing and has saved a great many site visits.

A more sophisticated version is configuration rollback:

Switch(config)# archive
Switch(config-archive)# path flash:backup
Switch(config-archive)# write-memory

Switch# configure terminal revert timer 10

The device automatically reverts the change after ten minutes unless you confirm it with configure confirm.

Where Each One Lives

MemoryHoldsVolatile
RAMRunning config, routing table, ARP table, buffers, the running IOS imageYes
NVRAMStartup config, and the configuration registerNo
FlashThe IOS image, backup configs, archivesNo
ROMROMMON, POST, bootstrapNo

Backing Up

! To a TFTP server
Switch# copy running-config tftp:
Address or name of remote host []? 10.10.10.50
Destination filename [switch-confg]? core-sw01-2026-08-28

! To local flash
Switch# copy running-config flash:backup-config

! Over SCP, which is the one to use in production
Switch# copy running-config scp:

Automated archiving keeps a version each time the config is saved:

Switch(config)# archive
Switch(config-archive)# path tftp://10.10.10.50/$h-config
Switch(config-archive)# write-memory
Switch(config-archive)# maximum 14

$h expands to the hostname. write-memory triggers an archive on every save.

Switch# show archive

Recovering a Lost Configuration

SituationRecovery
Made changes, not saved, device still upconfigure replace nvram:startup-config
Made changes, not saved, device rebootedGone. Restore from your backup.
Saved a bad configRestore from archive or TFTP backup
Erased the startup configRestore from backup; if the device is still up, copy run start rewrites it from RAM
Forgot the enable passwordPassword recovery via ROMMON, changing the config register to 0x2142 to skip loading the startup config

That last row is worth understanding: setting the configuration register to 0x2142 makes the device boot without loading the startup config. You then load it manually with copy startup-config running-config, change the password, set the register back to 0x2102, and save.

Switch# show version | include register

Habits Worth Building

  1. Save deliberately, not reflexively. Verify the change works first — the unsaved state is your undo.
  2. Use reload in before any remote change that could cost you access.
  3. Automate config archiving to a server, and check it is actually running.
  4. Back up before upgrades and before any significant change.
  5. Do not save at the end of a long session without reviewing the diff. You may be saving something you did not intend.
  6. Keep configuration backups in version control if you can — the history tells you when something changed and what it replaced.

Frequently Asked Questions

What happens if I do not save the running config?

The changes work until the device reboots, then they are gone and it comes back with the startup config. Occasionally this is deliberate — an unsaved change is a self-reverting one.

Is write memory the same as copy running-config startup-config?

Yes, identical. wr is the common abbreviation. The copy form is the modern syntax; write memory survives from older IOS and is still supported.

How do I undo changes without rebooting?

configure replace nvram:startup-config replaces the running config with the saved one. Note that copy startup-config running-config does not do this — it merges, leaving your additions in place.

Where is the startup config stored?

NVRAM, which is non-volatile and survives power loss. The running config lives in RAM and does not.

Can I schedule a configuration backup?

Yes — the archive feature writes a copy to TFTP, FTP or flash on every save, or on a timer. Combine it with a configuration management tool for full history.

What is the configuration register?

A value in NVRAM controlling how the device boots. 0x2102 is normal; 0x2142 skips the startup config and is used for password recovery. Check it with show version. See Cisco IOS for more on the boot process.

GU
Written by

Gurpreet Singh

Hey! I"m Gurpreet Singh and I Have 7+ Years of experience in the Network & Security Domain as well as the Cloud Infra Domain. I am Certified with Cisco ( CCNA ), CheckPoint ( CCSA ), 1xAWS, 3xAZURE, and 3xNSE. So I love to share my tech knowledge with you.

Leave a Reply

Your email address will not be published. Required fields are marked *