The operating system has the option of being able to check the hard drive and its current state, automatically notifying the user if the failure rate increases through the Smartmontools. This is a package of 2 programs: smartctl and smartd.
Smartctl allows control to self-monitor, analyze, report on ATA-3 and other hard drives and SSDs.
Here at Ibmi Media, we shall look into how to install smartctl on Ubuntu 20.04.
Steps to install Smartctl on Ubuntu Linux system
1. Perform System Update
To begin, Update the system's packages by running the below command:
$ sudo apt update
2. Install smartmontools
Now, install the smartmontools package with the below command:
$ sudo apt install smartmontools
3. Check System Drive type
Here, check if your drive is SMART type with the below command:
$ sudo smartctl -i /dev/sda
4. Enable smartctl to auto-launch
Now, enable smartctl to auto-launch with the below command:
$ sudo smartctl -s on /dev/sda
How to Uninstall the Smartctl tool from Ubuntu 20.04 ?
To uninstall only the smartmontools package we can use the following command:
$ sudo apt-get remove smartmontools
We can use the following command to remove smartmontools configurations, data and all of its dependencies, we can use the following command:
$ sudo apt-get -y autoremove --purge smartmontools