sudo apt install smartmontools
The -H flag will check the current health of a drive
sudo smartctl -H /dev/sda
The -i flag will display details of the drive
sudo smartctl -i /dev/sda
The --test=short flag will perform a check of the drive
sudo startclt --test=short /dev/sda
The -a flag will display the results of the test
sudo smartctl -a /dev/sda