show file systems
Displays a list of all file systems available on the Cisco IOS device, including their type, permissions, and usage statistics, used for verifying storage availability and managing files.
Definition: show file systems is a Cisco IOS privileged exec command. Displays a list of all file systems available on the Cisco IOS device, including their type, permissions, and usage statistics, used for verifying storage availability and managing files.
Overview
The 'show file systems' command in Cisco IOS privileged EXEC mode provides a comprehensive listing of all file systems available on the device, including their type (such as flash, disk, nvram, or network), permissions (read-only, read-write), total and available space, and a description of the file system. This command is essential for network engineers to verify storage availability before performing operations like copying images, backing up configurations, or upgrading IOS. It helps identify which file systems are accessible, their capacity, and whether they are writable, preventing errors during file transfers.
The command is particularly useful when troubleshooting issues like insufficient space for a new IOS image or when verifying that a USB flash drive is recognized. Unlike 'dir' which shows files in a specific directory, 'show file systems' gives a high-level view of all available storage resources. It fits into the broader workflow of system maintenance, often used before 'copy' commands to confirm destination availability.
The output is typically not buffered and appears immediately; privilege level 15 is required. The command does not affect the running configuration. Understanding the output helps engineers choose the correct file system for operations, such as 'flash:' for persistent storage or 'nvram:' for startup configuration.
Common file systems include 'flash:' (internal flash), 'disk0:' (external USB), 'nvram:' (non-volatile RAM), 'system:' (running config), and 'xmodem:' or 'tftp:' for network transfers. The 'show file systems' command also displays the prefix used in file system references, which is critical for correct syntax in subsequent commands. For example, knowing that the USB flash drive is 'disk0:' allows the engineer to copy files to 'disk0:'.
The command is supported across IOS versions, though output format may vary slightly. It is a foundational tool for any engineer managing Cisco devices, ensuring that storage resources are properly accounted for before critical operations.
show file systemsWhen to Use This Command
- Checking available flash memory before copying a new IOS image
- Verifying USB or external storage is recognized and writable
- Troubleshooting 'no space left on device' errors when saving configurations
- Identifying the correct file system prefix (e.g., flash0:) for file operations
Command Examples
Basic show file systems output
show file systemsFile Systems:
Size(b) Free(b) Type Flags Prefixes
-------------- -------------- ---- ----- ------------------------------
* 256901120 123456789 flash rw flash0:
256901120 123456789 flash rw flash1:
- - nvram rw nvram:
- - opaque rw system:
- - opaque rw null:
- - opaque ro xmodem:
- - opaque ro ymodem:
- - opaque rw tftp:
- - opaque rw ftp:
- - opaque rw http:
- - opaque rw scp:
- - opaque rw https:
- - opaque ro cns:The output lists all file systems. The asterisk (*) indicates the default file system. 'Size(b)' and 'Free(b)' show total and available bytes (dashes for network/opaque types). 'Type' indicates storage type (flash, nvram, opaque). 'Flags' show permissions: rw=read/write, ro=read-only. 'Prefixes' are the names used in commands (e.g., copy flash0:).
Checking flash space before upgrade
show file systemsFile Systems:
Size(b) Free(b) Type Flags Prefixes
-------------- -------------- ---- ----- ------------------------------
* 512000000 45000000 flash rw flash0:
- - nvram rw nvram:
- - opaque rw tftp:Here, flash0: has 512 MB total with only 45 MB free. This indicates low space; a new IOS image (typically 100-200 MB) would not fit. The nvram and tftp file systems show no size info because they are not fixed-size storage.
Understanding the Output
The 'show file systems' command displays a table with columns: Size(b) (total bytes), Free(b) (available bytes), Type (flash, nvram, opaque, etc.), Flags (rw=read/write, ro=read-only), and Prefixes (the file system name used in commands like copy, dir, delete). The asterisk marks the default file system. For flash and nvram, size and free values are shown; for network file systems (tftp, ftp, scp) and others (system, null, xmodem), these fields show dashes because they are not local storage.
A low free space on flash (e.g., < 10% of total) indicates risk for file operations. Flags 'ro' mean you cannot write to that file system. This command is essential before any file transfer or upgrade to ensure sufficient space and correct permissions.
Configuration Scenarios
Verify available space on flash before upgrading IOS
A network engineer needs to upgrade the IOS image on a Cisco router and must ensure there is enough free space on the flash file system to accommodate the new image.
Topology
R1 (single router, no topology needed)Steps
- 1.Step 1: Enter privileged EXEC mode: enable
- 2.Step 2: Display all file systems: show file systems
- 3.Step 3: Identify the flash file system (e.g., flash:) and note its available space (e.g., 12345678 bytes free).
- 4.Step 4: Compare available space with the size of the new IOS image (e.g., 50 MB). If insufficient, delete unnecessary files using 'delete flash:old-image.bin'.
! No configuration changes needed; verification only
Router> enable
Router# show file systems
File Systems:
Size(b) Free(b) Type Flags Prefixes
* 256000000 12345678 flash rw flash:
32768 32768 nvram rw nvram:
...Verify: After deleting files, re-run 'show file systems' to confirm free space increased. Then use 'dir flash:' to list remaining files.
Watch out: Engineers often mistake the 'Free(b)' column for available space but forget that some file systems (like nvram) have very small capacity. Always check the correct file system prefix.
Identify a newly inserted USB flash drive
An engineer inserts a USB flash drive into a Cisco router to transfer a configuration backup and needs to confirm the device is recognized and its file system prefix.
Topology
R1 (single router with USB port)Steps
- 1.Step 1: Insert USB flash drive into the router's USB port.
- 2.Step 2: Enter privileged EXEC mode: enable
- 3.Step 3: Display file systems: show file systems
- 4.Step 4: Look for a file system with type 'disk' and description containing 'usbflash' or similar. Note its prefix (e.g., disk0:).
- 5.Step 5: Verify contents: dir disk0:
! No configuration needed
Router> enable
Router# show file systems
File Systems:
Size(b) Free(b) Type Flags Prefixes
* 256000000 12345678 flash rw flash:
32768 32768 nvram rw nvram:
8000000000 8000000000 disk rw disk0:
...Verify: The output shows disk0: with size 8 GB (8000000000 bytes) and free space equal to size, indicating an empty USB drive. Use 'dir disk0:' to list files.
Watch out: Some older routers may not support USB or require a specific file system type. If the USB is not listed, check physical connection or try 'show usb' if available.
Troubleshooting with This Command
When troubleshooting storage-related issues, 'show file systems' is the first command to run. Healthy output shows all expected file systems (flash, nvram, etc.) with reasonable free space. Problem indicators include missing file systems (e.g., no flash: listed), extremely low free space (e.g., less than 10% of total), or file systems with 'ro' (read-only) flags when they should be 'rw'.
For example, if flash: is missing, the device may have a hardware failure or the file system is corrupted. If nvram: shows 0 bytes free, the startup configuration may be too large or nvram is full, causing configuration save failures. The 'Flags' column is critical: 'rw' means read-write, 'ro' means read-only, and 'r' means read-only (no write).
A file system that should be writable but shows 'ro' indicates a problem (e.g., flash is write-protected or USB is locked). The 'Prefixes' column shows the exact string to use in commands like 'copy running-config startup-config' (which uses 'nvram:') or 'copy tftp: flash:'. If a prefix is missing, the corresponding file system is inaccessible.
A step-by-step diagnostic flow: 1) Run 'show file systems' and check for all expected file systems. 2) If a file system is missing, check hardware (e.g., reseat flash card) or run 'show flash:' to see if the file system responds. 3) If free space is critically low, use 'dir' to identify large files and delete unnecessary ones. 4) If a file system shows 'ro' unexpectedly, check for write-protect switches on USB drives or file system corruption. Correlate with 'show version' to confirm the device model and expected storage. For example, a 2900 series router should have flash: and nvram:; if not, suspect hardware failure.
Also use 'show logging' to see if there are any file system errors. In cases of corruption, the 'format flash:' command may be needed, but that erases all data. Always back up critical files before formatting.
The 'show file systems' command is also useful when 'copy' commands fail with 'insufficient space' errors; it confirms the actual available space versus the file size. Remember that some file systems like 'system:' are virtual and show 0 size; they are not for storage. Understanding these nuances helps engineers quickly isolate storage problems.
CCNA Exam Tips
CCNA exam tip: The asterisk (*) indicates the default file system used when no prefix is specified in commands like 'copy' or 'dir'.
CCNA exam tip: Know that 'flash0:' is typically the default, but if multiple flash file systems exist, the asterisk shows which one is active.
CCNA exam tip: The 'opaque' type includes network file systems (tftp, ftp, scp) and virtual file systems (system, null). They show no size because they are not local storage.
CCNA exam tip: If you see 'ro' flags on flash, the file system is read-only (e.g., if the switch is in ROMMON mode).
Common Mistakes
Mistake 1: Assuming all file systems have size information; network file systems like tftp: show dashes, which is normal.
Mistake 2: Forgetting to check free space before copying a file, leading to 'no space left on device' errors.
Mistake 3: Using the wrong prefix (e.g., 'flash1:' instead of 'flash0:') when multiple flash file systems exist, causing file operations to fail.
show file systems vs show version
Both 'show file systems' and 'show version' are privileged EXEC commands used for system diagnostics, but they focus on different aspects. 'show file systems' provides storage-related details, while 'show version' gives an overall device summary; they are often considered together during initial device assessment or troubleshooting.
| Aspect | show file systems | show version |
|---|---|---|
| Primary Purpose | List file systems and storage statistics | Display system hardware and software information |
| Data Presented | File system types, permissions, size, used/free space | IOS version, uptime, memory, interfaces, configuration register |
| Common Use Case | Verify storage availability for file transfers | Check software version before upgrade or compatibility |
| Output Style | Tabular format with columns | Narrative multi-line display |
Use show file systems when you need to check available disk space or file system permissions before copying or deleting files.
Use show version when you need to verify the IOS version, device model, or uptime for troubleshooting or compatibility checks.
Platform Notes
In IOS-XE (e.g., Catalyst 9000 switches), the 'show file systems' command output is similar but may include additional file systems like 'bootflash:' and 'usbflash0:'. The syntax is identical. On NX-OS (e.g., Nexus switches), the equivalent command is 'show file systems' as well, but the output format differs slightly; it lists file systems with columns for 'Size', 'Used', 'Avail', 'Use%', 'Mounted on'.
NX-OS also uses different prefixes like 'bootflash:' and 'volatile:'. On ASA firewalls, the command is 'show file system' (singular) and provides similar information but with ASA-specific file systems like 'disk0:' and 'flash:'. In IOS-XR (e.g., ASR 9000), the command is 'show filesystem' (singular) and the output is more detailed, including 'Filesystem', 'Size', 'Available', 'Used', 'Capacity', 'Mount point'.
IOS-XR also uses 'harddisk:' and 'disk0:' prefixes. Between IOS versions (12.x vs 15.x vs 16.x), the output format is largely consistent, but newer versions may include additional file systems like 'crashinfo:' or 'obfl:'. Always check the specific platform documentation.
For example, on IOS 15.x, the 'show file systems' command may show 'flash0:' instead of 'flash:' on some platforms. The command is available in all privilege levels that allow 'show' commands, but full details require privilege level 15. On some platforms, the output may be truncated if the terminal length is set; use 'terminal length 0' to disable paging.
Related Commands
delete [file]
Deletes a file from the device's flash memory or other storage, used to remove unwanted configuration files, IOS images, or other stored data.
dir
Lists files in the specified filesystem (flash, NVRAM, USB, bootflash). Shows file names, sizes in bytes, dates, and total/free space available.
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 practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions