How to Fix “-bash: hdparm: command not found” on Linux CentOS 6.3

Share this Article :

hard diskQuestion:
When i try to run hdparm command to check to check the hard drive read and writing speed, the following error has been returned. Hdparm is a command line utility to measure sequential disk performance which is primarily used to tune and optimize disk parameters. Hdparm is free software under the BSD license.

[[email protected] ~]# hdparm -t /dev/sda
-bash: hdparm: command not found

To Fix this, install hdparm command line utility on CentOS 6.3 using two method :

Also Read :   How to Resolve window handle for the 'AxQuickMksAxCtl' Control Error

Method 1: Install hdparm using yum command :

[[email protected] ~]# yum install hdparm -y

Example :

[[email protected] ~]# yum install hdparm -y
Loaded plugins: fastestmirror, presto, priorities
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * updates:
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package hdparm.i686 0:9.16-3.4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package               Arch                Version                        Repository           Size
 hdparm                i686                9.16-3.4.el6                   base                 72 k

Transaction Summary
Install       1 Package(s)

Total download size: 72 k
Installed size: 134 k
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 72 k
hdparm-9.16-3.4.el6.i686.rpm                                                 |  72 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : hdparm-9.16-3.4.el6.i686                                                         1/1
  Verifying  : hdparm-9.16-3.4.el6.i686                                                         1/1

  hdparm.i686 0:9.16-3.4.el6


Method 2 : Install hdparm using RPM packages as per OS and bit :

For 32 Bit :

[[email protected] ~]# rpm -Uvh

For 64 Bit :

[[email protected] ~]# rpm -Uvh

Verify if the hdparm RPM is installed or not by using the following command :

[[email protected] ~]# rpm -qa | grep hdparm

Leave a Reply