What is the best way to scan a hard drive/check health in Ubuntu?

I did a search beforehand and I don't think a similar question has been asked before.

I have two hard disk drives - a 1TB Seagate and a 1TB Western Digital. My Seagate drive crashed a while back and I suspect it may have some damaged sectors. I was just wondering what is the best way to perform a hard drive scan in Ubuntu and check hard disk health in general? I know both Seagate and WD provide their own software for scanning and repairing drives - can these be installed in Ubuntu? If not then can anyone tell me what method is recommended? Or, is it better to use the manufacturer's proprietary software through Windows?


I did a bit more reading into this myself. These two pages gives some tips about scanning hard drives/filesystems in Linux (they also mention fsck and badblocks):

http://www.howtogeek.com/howto/37659/the-beginners-guide-to-linux-disk-utilities/

http://mypage.uniserve.ca/~thelinuxguy/doc/hdtest.html

There is also the Ubuntu 'Disk Utility' package, which allows checking of the HDD SMART status.


A standard filesystem scan is usually done with fsck. This application handles most filesystems out of the box. However, you may need to install NTFS support separately on some installations.

If you'd like to do a surface scan of your drive you can use e2fsck. Use the -c option to do a bad sector scan.

It should also be mentioned that nearly every Linux distro is also configured by default to periodically scan your fixed drives on boot. They will also typically be setup to do this on a schedule (this is important since most Linux boxes rarely need to be reset).


You can use the command smartctl from the package smartmontools:

sudo apt install smartmontools
sudo smartctl -a /dev/sda

Where /dev/sda is the name of the device you want to scan.