

{"id":109655,"date":"2022-08-06T10:00:00","date_gmt":"2022-08-06T04:30:00","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=109655"},"modified":"2022-08-06T10:02:47","modified_gmt":"2022-08-06T04:32:47","slug":"linux-fsck-command","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/","title":{"rendered":"Linux FSCK Command with Examples"},"content":{"rendered":"<p>In this article, you will learn what fsck in Linux is. You will also learn why it is used, the syntax, and how to check and repair filesystems using the fsck command.<\/p>\n<h3>What is Linux fsck command?<\/h3>\n<p>Fsck is a command-line-based utility in Linux-based operating systems that helps in checking the consistency of a file system. Fsck is the abbreviation for File System Consistency Check.<\/p>\n<p>We know that file systems are responsible for organizing how data is organized and recovered. Eventually, someday, somehow these filesystems may become corrupted and cannot access some parts of it. This is exactly when fsck comes to help as it checks, fixes, and reports errors in the filesystems.<\/p>\n<p>In simple words, fsck checks the filesystems for errors and outstanding issues. It is also used to fix potential and generate reports.<\/p>\n<p>Generally, fsck is run either automatically during boot time or run manually by the system administrator. A system administrator can also run the fsck too manually if they believe there is a problem with the file system.<\/p>\n<p>The command works directly on the data structures stored on the disk. The file system is normally checked while unmounted, mounted read-only, or with the system in a maintenance mode.<\/p>\n<h3>When do you use Linux fsck Command?<\/h3>\n<p>Talking with respect to time the tool can check automatically during reboot, or you can run it manually anytime you want. But talking with respect to the scenarios you need to use fsck, you can use the tool when<\/p>\n<p>1. Files in the system get corrupt<\/p>\n<p>2. System fails to boot<\/p>\n<p>3. Attached drives like SD cards and flash drives don\u2019t work as expected.<\/p>\n<p>4. You can also use fsck to simply run a file system check as preventive maintenance.<\/p>\n<h3>Syntax of Linux fsck command<\/h3>\n<p>Before we learn how to practically use the fsck command, let us learn the syntax of how to write it in the terminal. The syntax is pretty easy:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">fsck &lt;options&gt; &lt;file systems&gt;<\/pre>\n<p>There are 2 fields which we can, the options (which we will look at in detail later) and the filesystems. The filesystems can be a device, partition, mount point, or anything else.<\/p>\n<h3>Options used with the fsck command<\/h3>\n<p>The fsck command needs to be run with superuser privileges (sudo) or root. Let us look at the options we use along with fsck.<\/p>\n<h4>1. -A<\/h4>\n<p>This option checks all the filesystems<\/p>\n<h4>2. -a<\/h4>\n<p>This option tries to repair filesystems errors automatically. There ill be no prompts.<\/p>\n<h4>3. -C<\/h4>\n<p>This option shows the progress bar<\/p>\n<h4>4. -f<\/h4>\n<p>This option forces fsck to check a file system. Using this option memes fsck check even a clean filesystem<\/p>\n<h4>5. -l<\/h4>\n<p>This option locks the device to guarantee no other program will try to use the partition during the check.<\/p>\n<h4>6. -M<\/h4>\n<p>This option does not check the mounted filesystems<\/p>\n<h4>7. -N<\/h4>\n<p>This option only shows what would be done and no actual changes are made.<\/p>\n<h4>8. -P<\/h4>\n<p>This option checks the filesystems and root parallelly<\/p>\n<h4>9. -R<\/h4>\n<p>This option does not check the root filesystem.<\/p>\n<h4>10. -r<\/h4>\n<p>This option provides statistics for each device that is being checked.<\/p>\n<h4>11. -T<\/h4>\n<p>This option does not show the title.<\/p>\n<h4>12. -t<\/h4>\n<p>This option exclusively specifies the filesystem types to be checked. You can specify by separating them with a comma.<\/p>\n<h4>13. -y<\/h4>\n<p>This option tries to repair the filesystem type to check with fsck<\/p>\n<h4>14. -V<\/h4>\n<p>This option provides a description of what is being done.<\/p>\n<h3>Meaning of fsck exit codes<\/h3>\n<p>After running fsck, it will return an exit code, it is important to know the meaning of these exit codes:<\/p>\n<h4>a. 0<\/h4>\n<p>This exit code means that there are no errors.<\/p>\n<h4>b. 1<\/h4>\n<p>This exit code means that there were errors and fsck corrected them.<\/p>\n<h4>c. 2<\/h4>\n<p>This exit code means that the system should be rebooted.<\/p>\n<h4>d. 4<\/h4>\n<p>This exit code means that the errors in the filesystem were left uncorrected.<\/p>\n<h4>e. 8<\/h4>\n<p>This exit code means that there was an operational error.<\/p>\n<h4>f. 16<\/h4>\n<p>This exit code means that there is an error either in the usage or syntax.<\/p>\n<h4>g. 32<\/h4>\n<p>This exit code means that the fsck checking has been canceled by your request.<\/p>\n<h4>h. 128<\/h4>\n<p>This exit code means that there is a shared library error.<\/p>\n<p>You can look up these options or exit code meanings anytime by typing \u201cman fsck\u201d in the terminal:<\/p>\n<h3>Running Linux fsck command on reboot (recovery mode)<\/h3>\n<p>Now that you know the syntax, options and how to read the exit code, let us see the steps to run fsck command on reboot:<\/p>\n<p>1: To reboot your Linux system, type reboot in the terminal, or you can just do it the lengthy traditional way.<\/p>\n<p>2: While your system is rebooting, press and hold down the \u201cshift\u201d key to open up the grub menu. In the grub menu, select the \u201cadvanced options for ubuntu\u201d option as shown in the figure:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/selecting-advanced-options-in-GRUB-menu.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109885\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/selecting-advanced-options-in-GRUB-menu.webp\" alt=\"selecting advanced options in GRUB menu\" width=\"732\" height=\"500\" \/><\/a><\/p>\n<p>3. On the next screen select the \u201cUbuntu, with Linux 5.12.0-39-generic (recovery mode)\u201d option as shown:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/selecting-ubuntu-with-linux-generic-in-grub-menu.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109887\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/selecting-ubuntu-with-linux-generic-in-grub-menu.webp\" alt=\"selecting ubuntu with linux generic in grub menu\" width=\"710\" height=\"490\" \/><\/a><\/p>\n<p>4. Next, the recovery menu will open, where you will find different options like grub, clean, dpkg, root, network, system summary, and many more<\/p>\n<p>In the recovery menu navigate to the \u201cfsck\u201d option and press enter.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/selecting-fsck-in-grub-menu.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109888\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/selecting-fsck-in-grub-menu.webp\" alt=\"selecting fsck in grub menu\" width=\"775\" height=\"376\" \/><\/a><\/p>\n<p>A pop-up will ask you to confirm if you want to continue with fsck checking all filesystems. Press yes.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/popup-menu-of-confirmation.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109889\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/popup-menu-of-confirmation.webp\" alt=\"popup menu of confirmation\" width=\"780\" height=\"235\" \/><\/a><\/p>\n<p>On successful running of fcsk, you will see this screen:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/screen-on-succesfully-running-fsck.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109890\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/screen-on-succesfully-running-fsck.webp\" alt=\"screen on succesfully running fsck\" width=\"575\" height=\"283\" \/><\/a><\/p>\n<p>5. After successful checking, it will take you back to the previous screen, click on resume normal boot<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/resuming-normal-boot.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109891\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/resuming-normal-boot.webp\" alt=\"resuming normal boot\" width=\"780\" height=\"378\" \/><\/a><\/p>\n<p>And press on ok in the next popup to exit recovery mode and resume normal boot.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/confirmation-of-succesfull-boot.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109892\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/confirmation-of-succesfull-boot.webp\" alt=\"confirmation of succesfull boot\" width=\"780\" height=\"274\" \/><\/a><\/p>\n<p>And done! You have successfully checked your files systems during your systems reboot from the recovery menu<\/p>\n<h3>Checking and repairing filesystems manually<\/h3>\n<h4>Finding the disk to be checked<\/h4>\n<p>Before we start checking, we must first locate the disc you want to scan. You can do so by listing the filesystems disks with the \u201cdf\u201d command.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/output-screen-of-the-command-to-find-the-disk-to-be-checked.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109893\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/output-screen-of-the-command-to-find-the-disk-to-be-checked.webp\" alt=\"output screen of the command to find the disk to be checked\" width=\"728\" height=\"502\" \/><\/a><\/p>\n<p>For the sake of an example, I am going to take the filesystem \u201c\/dev\/sda1\u201d. You can take any filesystem you want, just make sure there are not many with the same name. If you wish to check how many filesystems are there with that name, you can do so by using the command \u201csudo parted &lt;filestystem name&gt; \u2018print\u2019 \u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/example-of-finding-a-disk-to-be-checked.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109900\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/example-of-finding-a-disk-to-be-checked.webp\" alt=\"example of finding a disk to be checked\" width=\"622\" height=\"282\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>sda is how Linux refers to the first SCSI disk, if you have 2, the second one would be called sdb<\/p>\n<h4>Unmounting a disk<\/h4>\n<p>If you run fsck directly, you will get an error message saying that it cannot continue checking and it is aborting.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/unmounting-a-disk.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109896\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/unmounting-a-disk.webp\" alt=\"unmounting a disk\" width=\"635\" height=\"267\" \/><\/a><\/p>\n<p>This happens because you did not unmount the disk, To unmount a disk use the command \u201csudo umount &lt;disk name&gt;\u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/unmounting-sucessfull.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109897\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/unmounting-sucessfull.webp\" alt=\"unmounting sucessfull\" width=\"664\" height=\"134\" \/><\/a><\/p>\n<p>After unmounting the disc, try to run fsck again and you will not find any errors.<\/p>\n<p>&nbsp;<\/p>\n<p>After running fsck, mount back the disk you have unmounted, you can mount a disk by using the command \u201cmount &lt;disk name&gt;\u201d<\/p>\n<h4>Performing a dry run with fsck<\/h4>\n<p>Before actually performing a proper check, let us do a dry run to ensure everything is in place.<\/p>\n<p>We can perform a dry run by using the command \u201csudo fsck -N &lt;dsik&gt;\u201d<\/p>\n<p>The option \u201c-N\u201d as we discussed above will only print what is going to happen, and not actually do anything.<\/p>\n<h4>Skip repair but print error output<\/h4>\n<p>If you use the command \u201csudo fsck -n &lt;file system name&gt;\u201d, fsck will print out the error message, if there is something wrong with the file system, but it will not repair it.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/skipping-repair-but-print-error-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109898\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/skipping-repair-but-print-error-output.webp\" alt=\"skipping repair but print error output\" width=\"1080\" height=\"254\" \/><\/a><\/p>\n<h4>Skipping search on mounted filesystems<\/h4>\n<p>If you wish to perform a search only on unmounted filesystems and avoid mounted file systems, you can do so by using the command \u201csudo fsck -M &lt;file system name&gt;\u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/skipping-search-on-mounted-filesystems.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109899\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/skipping-search-on-mounted-filesystems.webp\" alt=\"skipping search on mounted filesystems\" width=\"766\" height=\"272\" \/><\/a><\/p>\n<p>If you observe the above snippet, the command did not run when \u201c\/dev\/sda1\u201d was mounted but checked when it was unmounted.<\/p>\n<h4>Fix errors automatically<\/h4>\n<p>If you want fsck to fix errors automatically without prompting you to press y or n, you can use the command \u201csudo fsck -y &lt;filesystem name&gt;\u201d<\/p>\n<p>This command says yes to \u2018try to fix all errors\u2019 without being prompted every single time.<\/p>\n<h4>Forcing fsck to check a filesystem<\/h4>\n<p>Here forcing means to run a check even on a clean filesystem. By default, if you try performing an fsck check on a clean device, the tool skips the filesystem check.<\/p>\n<p>Hence to perform a force fsck check on a filesystem, you use the command \u201csudo fsck -f &lt;filesystem name&gt;\u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/forcing-fsck-to-check-a-filesystem.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109894\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/forcing-fsck-to-check-a-filesystem.webp\" alt=\"forcing fsck to check a filesystem\" width=\"906\" height=\"246\" \/><\/a><\/p>\n<p>This command will scan the file and performs all 5 checks to search for corruption in the filesystem, even though it is a clean file.<\/p>\n<h4>Running fsck on all filesystems at once<\/h4>\n<p>To perform an fsck check on all the file systems, use the command<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\u201csudo fsck -AR -y\u201d<\/pre>\n<p>The option \u201c-A\u201d searches all the filesystems, the option \u201c-R\u201d unmounts all the filesystems, and the flag \u201c-y\u201d is to avoid fsck printing us every time.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/skipping-repair-but-print-error-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109898\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/skipping-repair-but-print-error-output.webp\" alt=\"skipping repair but print error output\" width=\"1080\" height=\"254\" \/><\/a><\/p>\n<h4>Skipping fsck on a specific filesystem<\/h4>\n<p>If you want to skip fsck to search on a specific filesystem, you can do it by using the command \u201csudo fsck -AR -t &lt;filesystem name&gt; -y\u201d<\/p>\n<h3>Repairing a corrupted filesystem<\/h3>\n<p>If you don\u2019 know the name of the corrupted file system, you can either use the FDisk or DF commands. Once you find the corrupted file, the first thing you need to do in order to repair it is to unmount it using the following syntax: sudo unmount &lt;filename&gt;<\/p>\n<p>After unmounting it, repair it using the option \u201c-p\u201d as shown:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo fsck -p &lt;filename&gt;<\/pre>\n<p>The option \u201c-p\u201d automatically repairs the problems in th corrupted file.<\/p>\n<p>Once repairing is finished, mount back the file you unmounted earlier siding the following syntax and you are good to go: sudo mount &lt;filename&gt;<\/p>\n<h3>Repairing the root file system<\/h3>\n<p>We all know that the root directory is the \u201cground 0\u201d of the Linux file systems, and it can not be unmounted. So how exactly do you check the root filesystem without unmounting it?<\/p>\n<p>Well, if you want to check or repair the root directory, you actually have quite a number of options at hand. You can set fsck to run at boot time, you can boot the system in recovery mode or use a live CD<\/p>\n<p>Since we have already looked at how to run fsck during boot time and recovery mode, let us look at how to run fsck from a live distribution.<\/p>\n<p>First off, boot the live distribution and use the fdisk command to find the name of the root partition. Once you know the name of it, simply go to the terminal and use the option \u201c-p\u201d to repair it as shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo fsck -p &lt;partition name&gt;<\/pre>\n<p>Once done, restart the live distribution and start your system.<\/p>\n<h3>Fstab options<\/h3>\n<p>Before we address the options related to fstab, let us see what fstab is in the first place. Fstab is a configuration file that tells the system where and how to mount the partitions.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/displaying-contents-of-the-fstab-file.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109895\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/06\/displaying-contents-of-the-fstab-file.webp\" alt=\"displaying contents of the fstab file\" width=\"947\" height=\"291\" \/><\/a><\/p>\n<p>The last column in the fstab file controls the order in which the file system checks are done at reboot time. Let us take a look at what each option means:<\/p>\n<ul>\n<li>0 &#8211; Do not check filesystems<\/li>\n<li>1 &#8211; Check filesystems one at a time<\/li>\n<li>2 &#8211; check filesystems later and check parallelly if possible<\/li>\n<\/ul>\n<h3>What to do if fsck is interrupted?<\/h3>\n<p>It is very important to note that \u2018you\u2019 must never interrupt the fsck utility while it is in progress. Nonetheless, if the inevitable happens and the princess is interrupted, fsck will automatically finish the ongoing process and only then stop.<\/p>\n<p>If at all you find any error while the process or check was happening, fsck will not fix anything if it is interrupted. You can use the command again for fsck to check again and let it finish.<\/p>\n<h3>Summary<\/h3>\n<p>As you have seen, fsck is a really useful and powerful tool that helps in checking the consistency of a file system, it is also used to fix errors in files. Now you know what fsck is and when it is used. You also learned the syntax, options, exit codes, and how to run fsck checks both during reboot and manually.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, you will learn what fsck in Linux is. You will also learn why it is used, the syntax, and how to check and repair filesystems using the fsck command. What is&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":109749,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[26948,26950,26949],"class_list":["post-109655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-fsck-command-in-linux","tag-fstab-options","tag-syntax-of-linux-fsck"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Linux FSCK Command with Examples - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn what fsck command in Linux is? See why it is used, its syntax, and how to check and repair filesystems using the fsck command.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux FSCK Command with Examples - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn what fsck command in Linux is? See why it is used, its syntax, and how to check and repair filesystems using the fsck command.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-06T04:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-06T04:32:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/fsck-command-in-linux.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux FSCK Command with Examples - DataFlair","description":"Learn what fsck command in Linux is? See why it is used, its syntax, and how to check and repair filesystems using the fsck command.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/","og_locale":"en_US","og_type":"article","og_title":"Linux FSCK Command with Examples - DataFlair","og_description":"Learn what fsck command in Linux is? See why it is used, its syntax, and how to check and repair filesystems using the fsck command.","og_url":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2022-08-06T04:30:00+00:00","article_modified_time":"2022-08-06T04:32:47+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/fsck-command-in-linux.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"Linux FSCK Command with Examples","datePublished":"2022-08-06T04:30:00+00:00","dateModified":"2022-08-06T04:32:47+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/"},"wordCount":1998,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/fsck-command-in-linux.webp","keywords":["FSCK Command in Linux","Fstab options","syntax of linux fsck"],"articleSection":["Linux Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/linux-fsck-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/","url":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/","name":"Linux FSCK Command with Examples - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/fsck-command-in-linux.webp","datePublished":"2022-08-06T04:30:00+00:00","dateModified":"2022-08-06T04:32:47+00:00","description":"Learn what fsck command in Linux is? See why it is used, its syntax, and how to check and repair filesystems using the fsck command.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/linux-fsck-command\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/fsck-command-in-linux.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/fsck-command-in-linux.webp","width":1200,"height":628,"caption":"fsck command in linux"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/linux-fsck-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Linux Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/linux\/"},{"@type":"ListItem","position":3,"name":"Linux FSCK Command with Examples"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/109655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=109655"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/109655\/revisions"}],"predecessor-version":[{"id":109901,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/109655\/revisions\/109901"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/109749"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=109655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=109655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=109655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}