The Write Memory Cisco command
The Cisco command 'write memory' is used to save the current running configuration to non-volatile memory, typically Flash memory. This ensures that the configuration is retained even after a reboot or power cycle. The command can be used on a wide range of Cisco devices, including routers, switches, and firewalls.
To use the 'write memory' command, simply enter it into the command-line interface (CLI) of the device. The command will take effect immediately, and the configuration will be saved to Flash memory.
In addition to saving the running configuration, the 'write memory' command can also be used to save other types of files to Flash memory, such as startup configurations, IOS images, and license files. To do this, simply specify the filename and path as an argument to the command.
Here are some examples of how to use the 'write memory' command:
- To save the running configuration to Flash memory:
write memory
- To save the startup configuration to Flash memory:
write startup-config
- To save an IOS image to Flash memory:
write image flash:ios-image-name
- To save a license file to Flash memory:
write license flash:license-file-name
The 'write memory' command is an essential tool for Cisco administrators, as it allows them to easily save and restore the configuration of their devices. This can be critical in the event of a hardware failure or configuration error.
Here are some additional details about the 'write memory' command:
- The command is supported on all Cisco devices that run the IOS operating system.
- The command can be used to save multiple files to Flash memory at the same time. To do this, simply specify multiple filenames as arguments to the command.
- The command can be used to overwrite existing files in Flash memory. If a file with the same name already exists in Flash memory, the command will prompt you to confirm that you want to overwrite the file.
- The command will take effect immediately. There is no need to reboot the device for the changes to take effect.
write memory Usage Examples
The syntax for write memory
command in Cisco IOS is:
write memory [disk0:]
The following are some examples of the write memory
command:
To save the running configuration to the startup configuration in the flash memory:
write memory
To save the running configuration to a file named
config.txt
on a USB drive connected to the router:write memory disk0:/config.txt
To save the running configuration to the startup configuration in the flash memory, and then reload the router:
write memory; reload
To save the running configuration to a file named
config.txt
on a USB drive connected to the router, and then reload the router:write memory disk0:/config.txt; reload
To save the running configuration to the startup configuration in the flash memory, and then copy the running configuration to a TFTP server at the IP address 192.168.1.1:
write memory; copy running-config tftp 192.168.1.1
To save the running configuration to a file named
config.txt
on a USB drive connected to the router, and then copy the running configuration to a TFTP server at the IP address 192.168.1.1:write memory disk0:/config.txt; copy running-config tftp 192.168.1.1