Check filesystem in read only mode

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 -c {{/dev/sdXN}}

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