show flash
Displays the contents and status of the flash memory, including files, their sizes, and available space, used to verify IOS images and configuration files.
show flashWhen to Use This Command
- Check available flash memory before upgrading the IOS image.
- Verify that the correct IOS image is present after a download.
- Identify and delete unnecessary files to free up space.
- Confirm the file system type and total capacity of flash.
Command Examples
Basic show flash output
show flash-#- --length-- -----date/time------ path 1 45678912 Mar 1 2023 10:23:45 +00:00 c2960-lanbasek9-mz.150-2.SE11.bin 2 12345 Mar 1 2023 10:25:12 +00:00 config.text 3 567 Mar 1 2023 10:26:30 +00:00 vlan.dat 32456704 bytes available (45678912 bytes used)
The output lists files in flash: index number (#-), file size in bytes (--length--), timestamp (date/time), and filename (path). The last line shows total available space and used space. Here, the IOS image is the largest file, config.text is the startup config, and vlan.dat stores VLAN information.
Show flash with filesystem details
show flash:Directory of flash:/ 1 -rw- 45678912 Mar 1 2023 10:23:45 +00:00 c2960-lanbasek9-mz.150-2.SE11.bin 2 -rw- 12345 Mar 1 2023 10:25:12 +00:00 config.text 3 -rw- 567 Mar 1 2023 10:26:30 +00:00 vlan.dat 32456704 bytes total (45678912 bytes free)
Adding a colon after 'flash' shows the directory listing with file permissions (-rw- means read/write). The last line shows total flash size and free space. Note: free space is the amount available for new files.
Understanding the Output
The show flash command displays the contents of the flash memory file system. Each line represents a file with its index number, size in bytes, date and time of creation/modification, and the filename. The last line indicates total flash capacity and the amount of free space. In a real network, you use this to ensure there is enough space for new IOS images or to verify that the correct image is present. A low free space (e.g., less than 10% of total) may indicate a need to delete old files. The presence of multiple IOS images can cause confusion during boot; typically only one should be present. The config.text file is the startup configuration, and vlan.dat stores VLAN database information on switches. If the flash is full, you cannot copy new files, which can prevent upgrades or backups.
CCNA Exam Tips
CCNA exam may ask which file is the IOS image; look for .bin extension.
Know that 'show flash' output shows used and free space; be able to calculate remaining space.
Remember that deleting files from flash is done with 'delete flash:filename'.
The exam might test that 'show flash' is a Privileged EXEC command, not available in User EXEC.
Common Mistakes
Confusing 'show flash' with 'show running-config' — flash shows files, not running configuration.
Assuming 'show flash' shows the current IOS version; use 'show version' for that.
Forgetting that flash memory is non-volatile; files persist after reload.
Thinking 'show flash' works in User EXEC mode; it requires Privileged EXEC.
Related Commands
dir [flash:|nvram:|bootflash:]
Lists the contents of a specified file system (flash, nvram, or bootflash) on a Cisco IOS device, showing file names, sizes, dates, and available space.
show running-config
Displays the current active configuration in DRAM, showing all non-default settings.
show startup-config
Displays the saved configuration stored in NVRAM that loads on next device boot.
show version
Displays system hardware and software information, including IOS version, uptime, memory, interfaces, and configuration register, used to verify device identity and software compatibility.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions