---
name: "fsck"
section: "8"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/fsck"
---

# fsck(8)

file system consistency check and interactive repair

## NAME

**fsck** – file system consistency check and interactive repair

## SYNOPSIS

**fsck** \[**-dfNnpvy**\] \[**-b** *block#*\] \[**-l** *maxparallel*\] \[**-T** *fstype*:*fsoptions*\] \[**-t** *fstype*\] \[*special* \| *node* *...*\]

## DESCRIPTION

The **fsck** command invokes file-system-specific programs to check the special devices listed in the [fstab(5)](/fstab/5.md) file or on the command line for consistency.

It is normally used in the script [rc(8)](/rc/8.md) during automatic reboot. If no file systems are specified, **fsck** reads the file [fstab(5)](/fstab/5.md) to determine which file systems to check and in what order. Only partitions in fstab that are mounted “rw” or “ro” and that have non-zero pass numbers are checked. File systems with pass number 1 (normally just the root file system) are checked one at a time. When pass 1 completes, all remaining file systems are checked, with one process spawned per disk drive. The disk drive containing each file system is inferred from the longest prefix of the device name that ends in a digit; the remaining characters are assumed to be the partition designator. By default, file systems which are already mounted read/write are not checked.

The options are as follows:

- **-b** *block#*

  Causes **fsck** to use the specified block as the location of the superblock. Block 32 is usually an alternate super block. This option is only valid for filesystems that support backup superblocks (ffs and ext2fs).

- **-d**

  Debugging mode. Just print the commands without executing them. Available only if **fsck** is compiled to support it.

- **-f**

  Force checking of file systems, even when they are marked clean (for file systems that support this).

- **-l** *maxparallel*

  Limit the number of parallel checks to *maxparallel*. By default, the limit is the number of disks, running one process per disk. If a smaller limit is given, the disks are checked round-robin, one file system at a time.

- **-N**

  When using [fstab(5)](/fstab/5.md), only check filesystems that have the “net” mount option set. By default file systems with this option are ignored.

- **-n**

  Assume a “no” response to all questions asked by **fsck** except for “CONTINUE?”, which is assumed to be affirmative. File systems will not be opened for writing. This is the default for file systems to be checked that are concurrently mounted writable.

- **-p**

  Enter preen mode: **fsck** will check all file systems listed in [fstab(5)](/fstab/5.md) according to their pass number, or any special devices listed on the command line, and will make minor repairs without human intervention. Any major problems will cause **fsck** to exit with a non-zero exit code, so as to alert any invoking program or script that human intervention is required.

- **-T** *fstype*:*fsoptions*

  List of comma separated file system specific options for the specified file system type, in the same format as [mount(8)](/mount/8.md).

- **-t** *fstype*

  Invoke **fsck** only for the comma separated list of file system types. If the list starts with “no”, invoke **fsck** only in the file system types that are *not* specified in the list.

- **-v**

  Print the commands before executing them.

- **-y**

  Cause **fsck** to assume “yes” as the answer to all operator questions.

If neither of the **-y** or **-n** options are specified, the user may force **fsck** to assume an answer of “yes” to all the remaining questions by replying to a question with a value of “F”.

## FILES

- */etc/fstab*

  file system table

## SEE ALSO

[fs(5)](/fs/5.md), [fstab(5)](/fstab/5.md), [fsck\_ext2fs(8)](/fsck_ext2fs/8.md), [fsck\_ffs(8)](/fsck_ffs/8.md), [fsck\_msdos(8)](/fsck_msdos/8.md), [fsdb(8)](/fsdb/8.md), [growfs(8)](/growfs/8.md), [mount(8)](/mount/8.md), [newfs(8)](/newfs/8.md), [rc(8)](/rc/8.md), [scan\_ffs(8)](/scan_ffs/8.md)
