fsck [options] [filesystem] ...

System administration command. Call the filesystem checker for the appropriate system type to check and repair unmounted filesystems. If a filesystem is consistent, the number of files, number of blocks used, and number of blocks free are reported. If a filesystem is inconsistent, fsck prompts before each correction is attempted. fsck’s exit code can be interpreted as the sum of all conditions that apply:


No errors found.


Errors were found and corrected.


Reboot suggested.


Errors were found but not corrected.


fsck encountered an operational error.


fsck was called incorrectly.


fsck canceled by user request.


A shared library error was detected.



Pass all subsequent options to filesystem-specific checker. All options that fsck doesn’t recognize will also be passed.


Serial mode. Check one filesystem at a time.

-t fstype

Specify the filesystem type. Do not check filesystems of any other type. Multiple filesystem types to check can be specified in a comma-separated list.


Check all filesystems listed in /etc/fstab. The root filesystem is checked first.

-C [fd]

Display completion (progress) bar. Optionally specify a file-descriptor to receive the progress. (Useful for a GUI frontend.)


Don’t check mounted filesystems. Returns a 0 exit code for mounted system.


Suppress normal execution; just display what would be done.


Meaningful only with -A: check root filesystem in parallel with other systems. This option is potentially dangerous. ...

Get Linux in a Nutshell, 6th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.