The fsck command runs a file system consistency check on any Unix-based operating system, and is often considered a Linux technology that’s comparable to chkdsk. File system consistency problems generally occur as a result of system hangs or power and battery failures as well cases where a drive suddenly unmounts from a system for whatever reason. File transfer problems can plague backup drives.
Most casual users of Linux will never have to run fsck with any regularity, and this is especially true of those using the operating system on embedded devices like smartphones and tablets. However, system administrators often do need to run this program, and it’s impossible to do so on a live file system. A workaround is therefore needed.
Force fsck to Run at System Startup
If you cannot unmount a file system for whatever reason, which most likely means you boot from it, then you can still force your system to run fsck on the next boot with this command:
sudo touch /forcefsck
Start a graphical terminal by either selecting it from the Applications menu or holding down CTRL, ALT and T at the same time before issuing that command to it. You will need to enter your administration password when asked. Restart the system immediately after issuing the command. Once you’re back in you can check the results of the scan by issuing the command:
You may also wish to type:
This is in order to make sure that the forcefsck file is removed. If it’s not, then type:
sudo rm /forcefsck