There are two system files that store the device configuration:
startup-config - This is the saved configuration file that is stored in NVRAM. It contains all the commands that will be used by the device upon startup or reboot. Flash does not lose its contents when the device is powered off.
running-config - This is stored in Random Access Memory (RAM). It reflects the current configuration. Modifying a running configuration affects the operation of a Cisco device immediately. RAM is volatile memory. It loses all of its content when the device is powered off or restarted.
To save changes made to the running configuration to the startup configuration file, use the following privileged EXEC mode command.
Switch>en
Switch#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
To view startup configurations, the command is
Switch#show startup-config