Which Command Will Display The Contents Of Nvram: Complete Guide

14 min read

Which Command Will Display the Contents of NVRAM?
(And How to Use It Without Breaking Anything)


Ever stared at a router’s console and wondered what’s really stored in that tiny chunk of memory called NVRAM? Because of that, ” you’re not alone. You type a few commands, get a cryptic dump, and then… nothing. And if you’ve ever asked yourself, “Which command will display the contents of NVRam? The short answer is show run on most Cisco devices, but the story behind it is a bit messier. Let’s dig in, clear the fog, and give you a cheat‑sheet you can actually use tomorrow.

What Is NVRAM, Anyway?

NVRAM stands for non‑volatile random‑access memory. And power goes on or off, the notebook stays exactly the same. Think of it as the notebook a router keeps on its desk. In practice, that notebook holds the device’s startup configuration—the set of commands the system reads when it boots Turns out it matters..

On a Cisco IOS router, NVRAM is a tiny flash‑like chip (often just a few megabytes). Even so, the running config lives in RAM, which disappears the moment you power down. It’s not the same as the “running config” you see when you type show running-config. The startup config lives in NVRAM, waiting for the next power‑up.

Other vendors use different terms. Still, juniper calls it the configuration database, while Arista stores its startup config in flash but still treats it as “non‑volatile. ” The principle is the same: a persistent storage area that the OS reads at boot time Practical, not theoretical..

Where Does NVRAM Live Physically?

On older routers you’ll find a small battery‑backed chip soldered onto the motherboard. Modern devices often use a small flash module, but the OS still calls it NVRAM for legacy reasons. The key point is that you can read it without rebooting—provided you know the right command.

Why It Matters / Why People Care

If you’ve ever lost a configuration after a power outage, you know why NVRAM matters. The startup config is your safety net. But when you make changes, you must copy the running config to NVRAM with write memory or copy running-config startup-config. Forgetting that step means a reboot wipes out all your work Worth knowing..

Quick note before moving on.

But there’s another reason people hunt for the NVRAM dump: troubleshooting. Also, a corrupted startup file can prevent a router from booting correctly. By pulling the raw contents, you can spot stray characters, missing lines, or even a rogue no service password-encryption that’s been left in the file Practical, not theoretical..

And let’s not forget compliance. Auditors love to see the exact text that the device will load on boot. A simple show startup-config satisfies that request, but sometimes you need the raw NVRAM dump to prove nothing’s been tampered with between the OS and the file system.

How It Works (or How to Do It)

Below is the step‑by‑step for the most common platforms. I’ll also throw in a few “what if you’re not on Cisco?” notes, because the internet is full of mixed‑vendor environments Small thing, real impact..

Cisco IOS / IOS‑XE

Goal Command What You See
Display the startup config (the NVRAM contents) show startup-config Human‑readable config, exactly what’s stored in NVRAM
Show the raw NVRAM bytes (rarely needed) more system:startup-config Same text, but you can scroll with spacebar
Verify where the file lives dir nvram: Lists the NVRAM file system (usually just startup-config)

Why show startup-config is the answer
When you type show startup-config, IOS pulls the file from NVRAM and prints it to your terminal. It’s the same thing as opening the file in a text editor—only you’re doing it over a console or SSH session.

Quick Example

Router# show startup-config
Building configuration...

 Last configuration change at 15:42:01 UTC Tue Mar 12 2024
!
Here's the thing — version 15. Now, 6
service timestamps debug datetime msec
service timestamps log datetime msec
! hostname Router
!
Now, interface GigabitEthernet0/0
 ip address 192. Plus, 168. 1.Consider this: 1 255. Plus, 255. 255.That said, 0
! line vty 0 4
 login local
 transport input ssh
!


That block is literally what lives in NVRAM.

### Cisco ASA

ASA devices store their startup config in flash, not NVRAM, but the command you use is still `show running-config`. To see the saved version, you have to look at the flash file:

```text
ciscoasa# more system:/running-config

If you need the exact NVRAM equivalent, you can copy the file to a TFTP server and inspect it.

Juniper Junos

Junos doesn’t have NVRAM in the Cisco sense. The startup config lives in /config/juniper.conf.

user@router> show configuration | display set

If you really want the raw XML that Junos stores on disk:

user@router> file show /config/juniper.conf

Arista EOS

Arista treats the startup config like a regular file in flash:

switch# show startup-config

Or see the file directly:

switch# more /mnt/flash/startup-config

The “Raw Hex Dump” Approach

Sometimes you’re troubleshooting a corrupted NVRAM and need to see the binary representation. Cisco IOS lets you do that with the debug command, but it’s risky:

Router# debug system nvram

Warning: Enabling debug on a production router can flood the console and even cause a crash if you’re not careful. Only use it in a lab or under a change window Worth knowing..

Common Mistakes / What Most People Get Wrong

  1. Confusing running vs. startup – New admins type show running-config and think they’re looking at NVRAM. That’s RAM, not NVRAM. The startup file is the one you need to copy to NVRAM But it adds up..

  2. Forgetting to save – You make a change, verify it works, then reboot. Surprise! The device boots with the old config because you never ran write memory. The fix? copy running-config startup-config or the shorthand wr.

  3. Assuming NVRAM is unlimited – On older gear, NVRAM might be only 256 KB. If you try to dump a massive config, the command can truncate or fail. Trim unnecessary comments and unused ACLs.

  4. Using the wrong privilege level – show startup-config requires at least enable mode on Cisco. If you’re stuck at user exec (>), you’ll get a % Invalid input detected error Most people skip this — try not to..

  5. Running more system:startup-config on a switched‑off console – Some console servers don’t pass the more command correctly, resulting in garbled output. In those cases, use show startup-config and pipe to a TFTP server:

    Router# copy startup-config tftp:
    
  6. Thinking the command works on every OS – As we saw, Juniper, Arista, and others have their own syntax. Don’t assume “Cisco‑only” knowledge will translate Simple, but easy to overlook..

Practical Tips / What Actually Works

  • Always verify after a save. Run show startup-config | include hostname right after you copy the file. If the hostname matches, you’re good It's one of those things that adds up..

  • Automate backups. A simple cron job that runs copy startup-config tftp://<server>/router-$(date +%F).cfg eliminates the “I forgot to save” nightmare.

  • Use show archive on IOS‑XE. This command lists the last few saved configs, letting you roll back if you accidentally corrupted NVRAM Simple, but easy to overlook. That alone is useful..

    Router# show archive
    Configured archive entries:
    1    2024-03-12 15:42:01  startup-config
    2    2024-01-09 09:12:45  startup-config
    
  • Check NVRAM health. If you suspect a bad chip, run show version and look for the “NVRAM is 8K bytes” line. If the size is zero or missing, the hardware may need replacement.

  • Use terminal length 0 before dumping a large config. This prevents the “--More--” prompt from interrupting automated scripts.

    Router# terminal length 0
    Router# show startup-config
    
  • When in doubt, copy to a file first. Grab the config with copy startup-config flash:backup.cfg then more flash:backup.cfg. It gives you a stable reference point.

FAQ

Q: Is show startup-config the same as show run?
A: No. show run displays the running configuration in RAM. show startup-config reads the file stored in NVRAM. They often look identical after a save, but they’re separate copies Small thing, real impact..

Q: Can I edit the NVRAM file directly?
A: Not on Cisco IOS. You must edit the running config and then copy it to NVRAM. Some platforms (like Juniper) let you edit the XML file, but it’s risky and not recommended for production Simple as that..

Q: What if the router won’t boot because NVRAM is corrupted?
A: Boot into ROMMON, then use flash_init and load_helper to access the flash file system. You can then delete the bad startup-config and rebuild it from a backup.

Q: Does write memory work on all Cisco devices?
A: Mostly on IOS and IOS‑XE. On newer platforms (like Catalyst switches running IOS‑XE) the command write memory is an alias for copy running-config startup-config. On ASA, you use write memory as well, but it writes to flash, not NVRAM.

Q: How big can the NVRAM file be?
A: It depends on the hardware. Early 2500 routers had 64 KB; modern ISR routers may have 256 KB or more. If you hit the limit, you’ll see an error when you try to save.

Wrapping It Up

The command that actually displays what’s sitting in NVRAM is show startup-config on Cisco IOS, and its equivalents on other platforms. Knowing the difference between running and startup configurations, saving your changes, and backing up the file will keep you from pulling your hair out when a reboot wipes out a day’s worth of work Worth knowing..

So next time you’re staring at a console and wonder, “Which command will display the contents of NVRAM?But ” you now have the answer, the context, and a handful of tips to make sure you never lose that precious startup file again. Happy configuring!

Advanced Tricks for Power Users

If you’ve gotten comfortable with the basics, it’s time to explore a few of the less‑obvious capabilities that the show startup-config family can access. These tricks aren’t required for day‑to‑day work, but they can save you minutes (or hours) when you’re troubleshooting a complex deployment No workaround needed..

1. Diff the Running and Startup Configurations

When a device has been in service for a while, the running config often diverges from the saved startup config. Instead of manually scrolling through both outputs, use the built‑in diff utility:

Router# show archive config differences

On platforms that support the archive feature, this command prints a line‑by‑line comparison, highlighting additions (+) and deletions (-). It’s especially handy after a firmware upgrade that may have introduced new default statements.

If your IOS version lacks the archive command, you can achieve the same result with a quick script on a Linux workstation:

ssh admin@router 'show running-config' > run.cfg
ssh admin@router 'show startup-config' > start.cfg
diff -u start.cfg run.cfg | less

2. Pull the Startup Config via SNMP

Network management systems (NMS) often need to back up configs without logging in interactively. Cisco devices expose the startup configuration as an SNMP object:

  • OID: .1.3.6.1.4.1.9.2.1.55 (ciscoConfigCopyMIB)
  • Community: private (read‑only)

A simple snmpwalk will dump the config:

snmpwalk -v2c -c private 10.0.0.1 ciscoConfigCopyMIB::ccCopyStartupConfigFile

Because the data is returned in chunks, you may need to reassemble it with a small script. Most modern NMS products (SolarWinds, PRTG, LibreNMS) already have this capability built‑in, so you can schedule nightly backups without ever touching the CLI.

3. View the Raw NVRAM Hex Dump

Sometimes you need to confirm that the file itself is intact, especially after a power surge or a suspected flash corruption. The debug memory command can be used to dump the raw NVRAM contents:

Router# debug memory nvram
Router# show memory allocate

You’ll see a hexadecimal dump that you can compare against a known‑good reference. This is a low‑level operation and should only be performed in a lab or during a maintenance window, as it can impact device performance Easy to understand, harder to ignore. Which is the point..

4. Automate Periodic Backups with Embedded Event Manager (EEM)

EEM lets you trigger actions based on events such as a config change, a reload, or a timer. Below is a minimal script that copies the startup config to a TFTP server every 24 hours:

event manager applet backup-startup
 event timer cron name daily_backup cron-entry "0 0 * * *"
 action 1.0 cli command "enable"
 action 1.1 cli command "copy startup-config tftp://192.168.1.10/$(hostname)-$(date +%Y%m%d).cfg"

Deploy the applet once, and the router will push a timestamped copy to the TFTP server every midnight. Combine this with a version‑control system (Git, SVN) and you have a full audit trail of every configuration change Small thing, real impact. Worth knowing..

5. Use show tech-support to Capture the Startup Config in Context

When you open a support case with Cisco TAC, they often request the output of show tech-support. This command bundles a massive amount of diagnostic data, including the startup configuration. If you need a quick snapshot for a ticket, you can extract just the config portion:

show tech-support | begin ^!Current Configuration:
show tech-support | end ^!

Copy the block between those markers and paste it into the ticket. It guarantees the TAC sees exactly what the device will load on the next boot.

Common Pitfalls and How to Avoid Them

Symptom Likely Cause Remedy
show startup-config returns “% Invalid input detected at '^' marker.” You’re on a device that uses a different OS (e.
show archive config differences shows “No archive configured”.
copy startup-config flash: fails with “Insufficient space on flash”. Plus, g. Verify free space with show version. If NVRAM shows 0 bytes, replace the module or reload with a clean image and re‑create the config. Even so,
write memory returns “%Error: Invalid command” on a newer Catalyst switch. On top of that, , Junos, NX‑OS) Use the appropriate command (show configuration, show running-config, or show startup-config on NX‑OS)
Config changes disappear after a reboot, even though you used copy running-config startup-config. The archive subsystem isn’t enabled. Flash is full of old images or logs.

Worth pausing on this one.

Quick Reference Cheat Sheet

Goal Command Platform
Display NVRAM (startup) config show startup-config IOS, IOS‑XE, ASA
Show running config show running-config All
Save running → NVRAM copy running-config startup-config <br>or write memory IOS, IOS‑XE, ASA
Diff running vs. startup show archive config differences IOS with archive
Export to TFTP copy startup-config tftp://<server>/<file> All
Dump raw NVRAM debug memory nvram IOS (caution)
Automated backup (EEM) event manager applet … IOS, IOS‑XE
Junos equivalent show configuration Junos
NX‑OS equivalent show startup-config NX‑OS

Final Thoughts

Understanding where a Cisco device stores its configuration, how to retrieve it, and how to safeguard it is foundational to any network engineer’s toolkit. The show startup-config command is the gateway to the NVRAM contents, but the real power comes from knowing:

  1. When to use it – after a reboot, before a firmware upgrade, or when preparing a backup.
  2. How to verify it – by comparing against the running config, checking NVRAM health, and confirming file integrity.
  3. How to automate it – via EEM, SNMP, or scheduled scripts, ensuring you never lose a configuration due to human error.

By integrating these practices into your daily workflow, you’ll reduce downtime, accelerate troubleshooting, and keep a clean audit trail for compliance teams. The next time a colleague asks, “What’s in NVRAM?” you’ll not only point them to show startup-config but also hand them a toolbox of techniques to make that information actionable.

Quick note before moving on Simple, but easy to overlook..

Happy configuring—may your NVRAM always be full, your backups always be recent, and your routers never surprise you at reboot.

Fresh Out

Just Finished

You'll Probably Like These

Before You Go

Thank you for reading about Which Command Will Display The Contents Of Nvram: Complete Guide. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home