write memory
Saves the current running configuration to the startup configuration in NVRAM, ensuring changes persist after a reload.
write memoryWhen to Use This Command
- After making configuration changes on a router or switch, use this command to save them so they survive a reboot.
- Before performing a reload or power cycle, run this command to preserve the current configuration.
- When deploying a new device, after initial configuration is complete, save the configuration to NVRAM.
- After troubleshooting and applying a fix, save the configuration to ensure the fix is permanent.
Command Examples
Basic save of running configuration
write memoryBuilding configuration... [OK]
The output 'Building configuration...' indicates the router is compiling the running config into a format for NVRAM. '[OK]' confirms the save was successful.
Alternative command with same effect
copy running-config startup-configDestination filename [startup-config]? Building configuration... [OK]
This is the longer form of the same command. It prompts for a filename (default is startup-config). Press Enter to accept. The output confirms success.
Understanding the Output
The output of 'write memory' is minimal. It first displays 'Building configuration...' which means the router is processing the running configuration and preparing to write it to NVRAM. Then it shows '[OK]' to indicate the write was successful. If there is an error (e.g., NVRAM full or hardware failure), you might see 'Error writing to NVRAM' or similar. A successful save is critical for configuration persistence; without it, all changes are lost on reload.
CCNA Exam Tips
CCNA exam tip: 'write memory' and 'copy running-config startup-config' are equivalent; know both.
CCNA exam tip: The command must be executed in Privileged EXEC mode (enable mode).
CCNA exam tip: If you forget to save, a reload will revert to the last saved configuration.
CCNA exam tip: On some older IOS versions, 'write memory' is deprecated but still works.
Common Mistakes
Mistake 1: Running 'write memory' in User EXEC mode (>) instead of Privileged EXEC mode (#) — results in '% Invalid input detected'.
Mistake 2: Assuming 'write memory' saves to a remote server (it saves to local NVRAM).
Mistake 3: Forgetting to save after making changes, then reloading and losing all changes.
Related Commands
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions