How to Change The Periodic Disk Check in Ubuntu (fsck)

In Ubuntu (and most Linux distributions), your disks are checked every certain number of times your computer starts (using "fsck", "file system consistency check") to detect errors and correct them. If you're in a hurry, you can press the ESC key to skip this checking process and it will scan the disks the next time you start your computer.

But if you want, you can change the frequency of this disk checks using "tune2fs", which adjusts ext2/ext3 filesystem parameters. Here is an example:

sudo tune2fs -c 50 /dev/hda2

This command will change the check frequency for the partition /dev/hda2, so now this disk will be checked every 50 restarts.

Also, you can specify the number of days between days instead of the number of times your computer starts: