S.M.A.R.T. or Self-Monitoring, Analysis, and Reporting Technology is used to monitor hard drive's health status. Hard drive's failure can then be anticipated and appropriate action can be taken before it fails completely.
smartctl is a tool that can be used to check your S.M.A.R.T.-enabled hard disk drive's (hdd) status in Linux. It is part of the smartmontools suite and is available in most Linux distributions such as Ubuntu.
You can check disk health in Ubuntu and other Linux distribution by installing smartmontools suite and use the included smartctl utility at the terminal.
$ sudo apt update && sudo apt install --assume-yes smartmontools # Ubuntu and Debian
$ lsblk | grep disk sda 8:0 0 20G 0 disk sdb 8:16 0 5G 0 disk
$ sudo smartctl -t short /dev/sda smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-47-generic] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION === Sending command: "Execute SMART Short self-test routine immediately in off-line mode". Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful. Testing has begun. Please wait 2 minutes for test to complete. Test will complete after Wed Jul 17 15:58:30 2019 Use smartctl -X to abort test.
$ sudo smartctl -H /dev/sda smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-47-generic] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART Health Status: OK
Comment anonymously. Login not required.