I had a bad experience on an old Dell computer where shortly after installing Ubuntu on it, the hard drive failed due to excessive loading/unloading cycles. What is the best way to check the health of my hard drive in Ubuntu? Can it be done from the command line?
Asked
Active
Viewed 2.2e+01k times
3 Answers
9
There is also a utility called badblocks, and another called shred. Both of these utilities can perform read/write operations on your write drive that can be used to make sure that a drive is safe for use. Personally, if I saw an error in either of these I'd replace the drive.
They are very slow and can take some time to complete, but can give you a an idea of their health. Also, since they are writing you'll lose the data on the drive and should be run from live cd as suggested by caesay. I've been lugging around SystemRescueCd lately.

sosc
- 99
-
6
-
2@EliahKagan: I guess
shred
is suggested as a tool for stress testing the drive. – ntc2 May 22 '14 at 22:13 -
shred can be used as a digital data shredder to completly remove data from a drive, hence the name shred – s1mmel May 12 '20 at 19:13
-
1
gnome-disks
– kbuilds Nov 13 '15 at 15:31gnome-disks
is the current incantation. It's not the same aspalimpsest
but it's close. – Oli Aug 21 '19 at 13:43