hd-idle command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
hd-idle: command not found
or when using sudo you get the following error message
sudo: hd-idle: command not found
Solutions to hd-idle: command not found
How To Fix hd-idle: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu hd-idle is provided by hd-idle package.
hd-idle is:
hd-idle is a utility program for spinning-down external disks after a period of idle time. Since most external IDE disk enclosures don’t support setting the IDE idle timer, a program like hd-idle is required to spin down idle disks automatically.
A word of caution: hard disks don’t like spinning up too often. Laptop disks are more robust in this respect than desktop disks but if you set your disks to spin down after a few seconds you may damage the disk over time due to the stress the spin-up causes on the spindle motor and bearings. It seems that manufacturers recommend a minimum idle time of 3-5 minutes, the default in hd-idle is 10 minutes.
One more word of caution: hd-idle will spin down any disk accessible via the SCSI layer (USB, IEEE1394, …) but it will not work with real SCSI disks because they don’t spin up automatically. Thus it’s not called scsi-idle and It is not recommended to use it on a real SCSI system unless you have a kernel patch that automatically starts the SCSI disks after receiving a sense buffer indicating the disk has been stopped. Without such a patch, real SCSI disks won’t start again and you can as well pull the plug.
To fix this problem, we can install more using the command below.
sudo apt-get -y install hd-idle
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install hd-idle.
sudo apt -y install hd-idle
Or if you have aptitude installed you can use the following command.
sudo aptitude install hd-idle
Summary
In this tutorial we learn how to fix hd-idle command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.