Check filesystem and automatically repair any damaged blocks

e2fsck

  • Check a Linux ext2/ext3/ext4 filesystem. The partition should be unmounted.
    More information: <https://manned.org/e2fsck>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sudo e2fsck -p {{/dev/sdXN}}

click the source code to copy install e2fsck on any operating system with command-not-found.com