Hard Disk Drive

Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.)
Linux uses SmartMonTools to access the SMART information. The examples below use /dev/sda as the first internal hard disk drive, and /dev/sdb as the external usb drive.

Tests
Self-Test: Short (internal SATA)

smartctl -d ata --test=short /dev/sda

Self-Test: Long (internal SATA)

smartctl -d ata --test=long /dev/sda

Self-Test: Short (external USB)

smartctl -d sat,16 --test=short /dev/sdb

Self-Test: Long (external USB)

smartctl -d sat,16 --test=long /dev/sdb

Information
smartctl -a /dev/sda

Health Check
smartctl -d ata -H /dev/sda