How to Run Chkdsk in Ubuntu

How to Run Chkdsk in Ubuntu

Chkdsk is the Windows command for checking hard drives for errors and repairing them, if possible. If your company uses the Ubuntu Linux operating system rather than Windows, the chkdsk command will not work. The equivalent command for the Linux operating system is "fsck." You can only run this command on disks and filesystems that are not mounted (available for use). If you want to check a root filesystem (the filesystem that contains the base operating system commands), you should boot to a live Ubuntu CD.

1.
Right-click on the desktop and choose the "Open in Terminal" option from the menu that appears. A terminal window opens.
2. 
Type the following command to unmount the drive you want to check:
sudo umount /dev/sdb
Replace "/dev/sdb" with the device name for the drive you want to check.

3.
Type the following command to check the drive:
sudo fsck /dev/sdb
The command may take some time to complete, depending on the size of your drive. When the process is finished, a number will be displayed. A "0" indicates that no errors were found; a "1" means that errors were found and corrected; "2" means that the system should be rebooted; and a "4" indicates that file system errors were found but could not be corrected. Any other number indicates that the utility did not run correctly.
4.
Run the "fsck" command a second time if any number other than zero appears. This ensures that all errors were corrected.
5.
Reboot the system or type the command "sudo mount /dev/sdb" to remount the drive.

Warning

  • These steps were not tested on an NTFS partition.

留言

這個網誌中的熱門文章

【多益】現點現做的英文怎麼說呢?

《Microsoft Word 應用》:圖片被文字蓋住解決方法,不可設定為固定行高

如何在Ubuntu系統上安裝Notepad ++ (Install Notepad++ On Ubuntu 16.04 / 17.10 / 18.04 / 20.04)