smartctl Linux Commands: Quick Reference (-a, -H, -x, tests)

smartctl linux - custom-smart51-featured.png

smartctl linux and smartctl linux check disk are top impressions — this page is a one-screen command reference before the labs: check disk walkthrough and smartctl -x.

Pick the device

Use lsblk; on NVMe path is /dev/nvme0n1.

bashdevice
lsblk -o NAME,SIZE,TYPE,MODEL
sudo smartctl -i /dev/sda
lsblk
device

Health and attributes

-H PASSED/FAILED; -A or -a for counters.

bashhealth
sudo smartctl -H /dev/sda
sudo smartctl -A /dev/sda | egrep 'Realloc|Pending|Wear'
-H -a
health

Extended -x

Vendor pages and logs when support asks for dumps.

bash-x
sudo smartctl -x /dev/sda | head -80
-x
extended

Run a short test

Non-destructive; read log after.

bashtest
sudo smartctl -t short /dev/sda
sudo smartctl -l selftest /dev/sda
-t short
test

Quick Reference

Related tutorials

Diagrams are original illustrations by Gnome IT Solutions. Tutorial text © Gnome IT Solutions.