You may use the following commands to change the information stored in the dynamic RAM (running-config) or NVRAM (startup-config) on a Cisco router or switch.

To make changes to the configuration running in dynamic RAM (running-config file) you may use the following commands. In particular, the “configure terminal” command (or “config t” for short) is used to make changes to the running-config which is the configuration currently stored in the DRAM of the Cisco device.

router-1>enable
router-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
router-1(config)#

To make changes to NVRAM (the startup-config file) you may use the following commands. In particular, the “configure memory” command (or “config mem” for short) is used to make changes to the startup-config file. The startup-config file is the file that contains the router or switch default configuration after boot.

router-1>enable
router-1#configure memory

R2#

As you can see, when I entered the “configure memory” command the hostname of the router changed. This is due to the fact that I originally changed the hostname of the router to “router-1″ but did not save the information in DRAM (running-config) into NVRAM (startup-config).

As always, if you make a change to the running-config you must save it to the startup-config or any configuration changes will be lost after your next reboot of the router or switch. The commands to save the running-config into the startup-config are the following, “copy running-config startup-config”, “copy run start” or “write mem”.

Enjoy!