{"id":326998,"date":"2021-08-18T15:00:06","date_gmt":"2021-08-18T12:00:06","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-use-the-fsck-command-on-linux\/"},"modified":"2021-08-18T15:00:06","modified_gmt":"2021-08-18T12:00:06","slug":"how-to-use-the-fsck-command-on-linux","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-fsck-command-on-linux\/","title":{"rendered":"#How to Use the fsck Command on Linux"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a276af7bf21c\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a276af7bf21c\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-fsck-command-on-linux\/#File_Systems_Are_Software\" >File Systems Are Software<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-fsck-command-on-linux\/#Do_the_Preflight_Checks\" >Do the Preflight Checks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-fsck-command-on-linux\/#Using_the_fsck_Command\" >Using the fsck Command<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-fsck-command-on-linux\/#Using_fsck_On_the_Root_Partition\" >Using fsck On the Root Partition<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-fsck-command-on-linux\/#When_Things_Go_Wrong\" >When Things Go Wrong<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Use the fsck Command on Linux&#8221;<\/strong><\/p>\n<div>\n<figure style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage  wp-image-746070 size-full\" srcset=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/hard-drive-with-binary.png?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/hard-drive-with-binary.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" sizes=\"auto, 400w, 1200w\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/hard-drive-with-binary.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A hard disk drive with binary code written over it.\" width=\"1200\" height=\"675\" data-crediturl=\"https:\/\/www.shutterstock.com\/image-photo\/hard-disk-binary-194981474\" data-credittext=\"Pixza Studio\/Shutterstock\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\"><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.shutterstock.com\/image-photo\/hard-disk-binary-194981474\">Pixza Studio\/Shutterstock<\/a><\/span><\/figcaption><\/figure>\n<p>All of our important data sits in a file system of one type or another, and file system issues are bound to h<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>en. On Linux, we can use the <code>fsck<\/code> command to find and fix file system errors.<\/p>\n<h2 id=\"file-systems-are-software\"><span class=\"ez-toc-section\" id=\"File_Systems_Are_Software\"><\/span>File Systems Are Software<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>File systems are one of the most critical components of a computer. Without a file system, the computer can\u2019t store any data on a hard drive, whether that drive is a spinning mechanical platter or a solid-state drive. In fact, a file system has to be created before the operating system can be installed on the hard drive. There has to be something for the operating system files to be stored in. So a file system is created during the installation process.<\/p>\n<p>File systems are\u00a0created by software, written to by software, and read from by software. As you know, all complex software has bugs. Our data is critically important to us, so we\u2019re putting a lot of faith in file systems and the software that creates and uses them. If something goes wrong, we can lose access to portions of the file system or even an entire partition.<\/p>\n<p>Modern\u00a0journaling file systems\u00a0are better at handling problems that can be caused by a sudden loss of power or a system crash. They\u2019re robust, but they\u2019re not invincible. If their\u00a0internal tables get scrambled\u00a0they can lose track of where each file resides on the drive, what size it is, what name it has, and what file permissions are set on them.<\/p>\n<p>The <code>fsck<\/code> command lets you check that your file systems are healthy. If it finds any problems it can usually fix them for you too.<\/p>\n<h2 id=\"do-the-preflight-checks\"><span class=\"ez-toc-section\" id=\"Do_the_Preflight_Checks\"><\/span>Do the Preflight Checks<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Using <code>fsck<\/code> requires sudo privileges. Any command that can make changes to a file system needs to be treated with caution and restricted to those who know what they\u2019re doing.<\/p>\n<p>Pilots don\u2019t jump into an aircraft, start it up, and fly off into the pale blue yonder. They do preflight checks. There\u2019s too much at stake to do otherwise. That\u2019s a good habit to develop. Before you use <code>fsck<\/code> you need to ensure you\u2019re going to use it on the correct drive. So before doing anything with <code>fsck<\/code>, we\u2019re going to do a bit of reconnaissance.<\/p>\n<p>We\u2019ll start with <code>fdisk<\/code> and pipe it into <code>less<\/code>. We\u2019re not asking for information on a specific partition. By using the <code>-l<\/code> (list) option <code>fdisk<\/code> lists the partition tables on all devices it finds in the \u201c\/proc\/partitions\u201d file, if it exists.<\/p>\n<pre>sudo fdisk -l | less<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745924\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"644\" height=\"55\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We can see the entries for <code>\/dev\/sda<\/code> and <code>\/dev\/sdb<\/code>. You can scroll through the file to see any other entries that might exist on your computer.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745927\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Observe the output in the terminal window\" width=\"644\" height=\"380\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The partitions on <code>\/dev\/sda<\/code> are listed as <code>\/dev\/sda1<\/code>, <code>\/dev\/sda2<\/code>, and <code>\/dev\/sda3<\/code> . So we have three partitions on the first drive. We can see a little more information by using the <code>parted <\/code> command. We\u2019ll use the <code>'print'<\/code> option to display the partition tables in the terminal window.<\/p>\n<pre>sudo parted \/dev\/sda 'print'<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745928\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Get information on partition tables\" width=\"644\" height=\"55\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We get some extra information this time, including the type of file system on each partition.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745929\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/5.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"644\" height=\"315\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<pre>Model: ATA VBOX HARDDISK (scsi) &#13;\nDisk \/dev\/sda: 34.4GB &#13;\nSector size (logical\/physical): 512B\/512B &#13;\nPartition Table: gpt &#13;\nDisk Flags:&#13;\n&#13;\nNumber Start  End    Size    File system   Name                 Flags &#13;\n1      1049kB 2097kB 1049kB                                     bios_grub &#13;\n2      2097kB 540MB  538MB   fat32         EFI System Partition boot, esp &#13;\n3      540MB 34.4GB  33.8GB  ext4<\/pre>\n<p>There are three drives in this test computer. These are the results for the other two drives\u00a0<code>\/dev\/sdb<\/code> and <code>\/dev\/sdc<\/code>.\u00a0Note that these file systems have no \u201cName\u201d field.<\/p>\n<pre>sudo parted \/dev\/sdb 'print'<\/pre>\n<pre>Model: ATA VBOX HARDDISK (scsi) &#13;\nDisk \/dev\/sdb: 21.5GB &#13;\nSector size (logical\/physical): 512B\/512B &#13;\nPartition Table: msdos &#13;\nDisk Flags:&#13;\n&#13;\nNumber Start  End    Size   Type     File system Flags &#13;\n1      1049kB 21.5GB 21.5GB primary  ext4<\/pre>\n<pre>sudo parted \/dev\/sdc 'print'<\/pre>\n<pre>Model: ATA VBOX HARDDISK (scsi) &#13;\nDisk \/dev\/sdc: 21.5GB &#13;\nSector size (logical\/physical): 512B\/512B &#13;\nPartition Table: msdos &#13;\nDisk Flags:&#13;\n&#13;\nNumber Start  End    Size   Type     File system Flags&#13;\n1      1049kB 21.5GB 21.5GB primary  ext3<\/pre>\n<p>The second and third drives happen to be the same size, and each has a single partition. But the file system on the second drive is <code>ext4<\/code>, and the file system on the third drive is the older <code>ext3<\/code>.<\/p>\n<p>We pass a partition identifier to <code>fsck<\/code>, and it checks the file system on that partition. But we can\u2019t run <code>fsck<\/code> on a mounted file system. We need to unmount the drive. To do that we need to know the mount point that the partition\u2014and therefore the file system\u2014is mounted on.<\/p>\n<p>We can find that out easily using the <code>df<\/code> command.<\/p>\n<pre>df \/dev\/sdb1<\/pre>\n<pre>df \/dev\/sdc1<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745940\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/6.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"644\" height=\"190\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"using-the-fsck-command\"><span class=\"ez-toc-section\" id=\"Using_the_fsck_Command\"><\/span>Using the fsck Command<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We\u2019ve got all the information we need. The first thing we\u2019ll do is unmount the file system we\u2019re going to check. We\u2019re going to work on the file system on the first\u2014and only\u2014partition of <code>\/dev\/sdb<\/code>, which is <code>\/dev\/sdb1<\/code> . We saw earlier that this is an <code>ext4<\/code> file system, and it is mounted at \u201c\/run\/mount\/dave\/sata2.\u201d<\/p>\n<p>We\u2019ll use the <code>umount<\/code> command. Note there is no \u201cn\u201d in \u201cumount.\u201d<\/p>\n<pre>sudo umount \/run\/mount\/dave\/sata2<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745942\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/7.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Use the umount command to unmount the filesystem.\" width=\"643\" height=\"75\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>With <code>umount<\/code>, no <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/news\/\" data-internallinksmanager029f6b8e52c=\"2\" title=\"News\" target=\"_blank\" rel=\"noopener\">news<\/a> is good news. If you\u2019re returned silently to the command prompt, we\u2019re good to go.<\/p>\n<pre>sudo fsck \/dev\/sdb1<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745943\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/8.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Use the fsck command to check the status of the filesystem.\" width=\"644\" height=\"130\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>This file system is reported as being clean. That means the file system is reporting that it has no errors or issues. A deeper file system check is not automatically conducted. We can also look at the return code that <code>fsck<\/code> returned to the shell.<\/p>\n<pre>echo $?<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745944\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/9.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"644\" height=\"95\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The return value of zero indicates no errors. The possible return codes are:<\/p>\n<ul>\n<li><strong>0<\/strong>: No errors<\/li>\n<li><strong>1<\/strong>: Filesystem errors corrected<\/li>\n<li><strong>2<\/strong>: System should be rebooted<\/li>\n<li><strong>4<\/strong>: Filesystem errors left uncorrected<\/li>\n<li><strong>8<\/strong>: Operational error<\/li>\n<li><strong>16<\/strong>: Usage or syntax error<\/li>\n<li><strong>32<\/strong>: Checking canceled by user request<\/li>\n<li><strong>128<\/strong>: Shared-library error<\/li>\n<\/ul>\n<p>Despite the file system being reported as clean, we can force a file system check to take place, using the <code>-f<\/code> (force) option.<\/p>\n<pre>sudo fsck \/dev\/sdb1 -f<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745946\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/12.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Force a filesystem check using the force option in an fsck command\" width=\"644\" height=\"250\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>This time, the check takes longer to complete but it performs a more thorough test of the file system. Our file system was indeed clean, and no errors are reported. If issues are found as the tests are being conducted, you\u2019ll be prompted to let <code>fsck<\/code> fix the issue or ignore the error.<\/p>\n<p>When you have finished testing, you need to remount the file system. The easiest way to do this is to use <code>mount<\/code> with the <code>-a<\/code> (all) option. This checks \u201c\/etc\/fstab\u201d for the list of file systems, and makes sure they are all mounted just as they would be following a regular boot.<\/p>\n<pre>sudo mount -a<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745947\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/10.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Remount the file system using the mount command\" width=\"644\" height=\"75\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Note that we don\u2019t need to tell <code>fsck<\/code> what type of file system is on a partition; the utility determines that by examining the file system. That means we can force a file system check on <code>\/dev\/sdc1<\/code>, the <code>ext3<\/code> file system on our test PC, using exactly the same command we used on <code>\/dev\/sdb1<\/code>, which is an <code>ext4<\/code> partition.<\/p>\n<pre>sudo fsck \/dev\/sdc1 -f<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745948\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/13.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Use the fsck command to force a file system check\" width=\"644\" height=\"250\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You might not want to dive straight into fixing the file system. You might prefer to look before you leap. You can ask <code>fsck<\/code> not to offer to fix anything and just report issues to the terminal window. The <code>-N<\/code> (dry run) option does just that:<\/p>\n<pre>sudo fsck -N \/dev\/sdb1<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745950\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/11.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Before repairing a file system, do a dry run\" width=\"644\" height=\"130\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The opposite of that is to tell <code>fsck<\/code> to not bother prompting if it finds any errors, and to just go ahead and fix them. To do this, use the <code>-y<\/code> (no prompts) option.<\/p>\n<pre>sudo fsck -y \/dev\/sdb1<\/pre>\n<h2 id=\"using-fsck-on-the-root-partition\"><span class=\"ez-toc-section\" id=\"Using_fsck_On_the_Root_Partition\"><\/span>Using fsck On the Root Partition<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can\u2019t use <code>fsck<\/code> on a mounted partition, but to boot your computer the root partition must be mounted. So how can we run <code>fsck<\/code> on the root partition? The answer is to interrupt the boot process and run <code>fsck<\/code> in recovery mode.<\/p>\n<p>While your computer is booting, hold down a \u201cShift\u201d key. If you\u2019ve timed it right you won\u2019t boot into Linux. The boot process will stop at a black and white menu. The test machine used for this article was running Ubuntu but other distributions have the same type of menu, although it may vary in appearance. Where it says \u201cUbuntu\u201d in the screenshots it will have the name of your distribution.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745975\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/15.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Recovery menu with the advanced options menu item selected\" width=\"640\" height=\"380\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Move the highlight bar with the \u201cUp Arrow\u201d and \u201cDown Arrow\u201d keys so that the \u201cAdvanced options for Ubuntu\u201d menu item is selected. Hit \u201cEnter\u201d to move to the next screen.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745976\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/16.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Recovery menu with &quot;recovery mode&quot; menu item selected\" width=\"640\" height=\"380\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Select the option that ends with \u201c(recovery mode).\u201d In our example, it is \u201cUbuntu, with Linux 5.11.0-20-generic (recovery mode).\u201d Hit the \u201cEnter\u201d key.<\/p>\n<p>You\u2019ll see the recovery menu. Select \u201cfsck check all file systems\u201d and press the \u201cTab\u201d key to move the highlight to the \u201cOK\u201d button. Press \u201cEnter.\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745988\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/18.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Recovery menu with fsck selected \" width=\"630\" height=\"288\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You\u2019ll see a notification that the root partition will be mounted along with any other partitions defined in your \u201c\/etc\/fstab\u201d file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-745989\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/19.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Select yes to initiate fsck in interactive mode\" width=\"630\" height=\"160\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Press the \u201cTab\u201d key to move the highlight to the \u201cYes\u201d button and press \u201cEnter.\u201d<\/p>\n<p>You\u2019ll see <code>fsck<\/code> run in interactive mode. If there are problems you\u2019ll be prompted to let <code>fsck<\/code> fix them or to ignore them. When the file systems have been checked you\u2019ll see the recovery menu again.<\/p>\n<p>Select the \u201cresume\u201d option, press the \u201cTab\u201d key to move the highlight to the \u201cOk\u201d button, and press \u201cEnter.\u201d The boot process will resume, and you\u2019ll boot into Linux.<\/p>\n<p>The recovery mode boot can affect some drivers, so it\u2019s good practice to reboot once more, as soon as you boot into Linux. This ensures your computer is operating in its standard fashion.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"When_Things_Go_Wrong\"><\/span>When Things Go Wrong<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Safety nets are there for a reason. Get to know the <code>fsck<\/code> command. If the need arises to use it in anger one day, you\u2019ll be glad you familiarized yourself in advance.<\/p>\n<\/div>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/745921\/how-to-use-the-fsck-command-on-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Use the fsck Command on Linux&#8221; Pixza Studio\/Shutterstock All of our important data sits in a file system of one type or another, and file system issues are bound to happen. On Linux, we can use the fsck command to find and fix file system errors. File Systems Are Software File systems are&#8230;<\/p>\n","protected":false},"author":1,"featured_media":326999,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/08\/hard-drive-with-binary.png?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-326998","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/326998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=326998"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/326998\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/326999"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=326998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=326998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=326998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}