fsck
system managementLinux/Unix
The fsck command is one of the most frequently used commands in Linux/Unix-like operating systems. fsck Check and repair a Linux filesystem
Quick Reference
Command Name:
fsck
Category:
system management
Platform:
Linux/Unix
Basic Usage:
fsck [options] [arguments]
Common Use Cases
Syntax
fsck [options] [filesystem...]
Options
Option | Description |
---|---|
-A |
Check all filesystems listed in /etc/fstab |
-C |
Display progress bar while checking |
-N |
Don't execute, just show what would be done |
-R |
Skip the root filesystem when used with -A |
-T |
Don't show the title on startup |
-V |
Verbose mode, shows filesystem-specific commands |
-a |
Automatically repair the filesystem without asking |
-f |
Force checking even if the filesystem is clean |
-M |
Skip mounted filesystems |
-n |
Don't make any changes to the filesystem (answer 'no' to all questions) |
-r |
Interactive repair mode (ask before fixing) |
-t type |
Specify the filesystem type(s) to check |
-v |
Verbose mode, more details about the checking process |
-y |
Assume 'yes' to all questions (non-interactive mode) |
Examples
How to Use These Examples
The examples below show common ways to use the fsck
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
fsck /dev/sda1