How to Use ‘fsck’ to Repair Linux File System Errors

Screenshot 20230412 211753

Linux Filesystems are responsible for organizing how data is stored and recovered. One way or another, with time, the filesystem may become corrupted and certain parts of it may not be accessible. If your filesystem develops such inconsistency it is recommended to verify its integrity.

This can be completed via a system utility called fsck (file system consistency check), which checks the root file system automatically during boot time or ran manually.

As the article says, you can’t run it on a mounted file system, and it gives a great suggestion on how to ensure fsck runs on your root partition at the next boot up.

See https://www.tecmint.com/fsck-repair-file-system-errors-in-linux/