Linux – Schedule file system check on next reboot

A file system check in Linux is equivalent to chkdsk in Windows. It can only run on unmounted drive so if you want to run it on the next reboot, you can use the following command.

shutdown -rF now

 

Alternatively, you can also use the command below to schedule the fsck.

sudo touch /forcefsck

 

Done =)

Reference: nixCraft – Linux Force fsck on the Next Reboot or Boot Sequence

Advertisement

One thought on “Linux – Schedule file system check on next reboot”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.