How To Install sdparm on CentOS 7

In this tutorial we learn how to install sdparm on CentOS 7. sdparm is List or change SCSI/SATA disk parameters

Introduction

In this tutorial we learn how to install sdparm on CentOS 7.

What is sdparm

SCSI disk parameters are held in mode pages. This utility lists or changes those parameters. Other SCSI devices (or devices that use the SCSI command set e.g. some SATA devices) such as CD/DVD and tape drives may also find parts of sdparm useful. Requires the linux kernel 2.4 series or later. In the 2.6 series any device node the understands a SCSI command set may be used (e.g. /dev/sda). In the 2.4 series SCSI device node may be used. Fetches Vital Product Data pages. Can send commands to start or stop the media and load or unload removable media. Warning settings such that the disk stops operating or is slowed down. Use with care.

We can use yum or dnf to install sdparm on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install sdparm.

Install sdparm on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install sdparm using yum by running the following command:

sudo yum -y install sdparm

Install sdparm on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install sdparm using dnf by running the following command:

sudo dnf -y install sdparm

How To Uninstall sdparm on CentOS 7

To uninstall only the sdparm package we can use the following command:

sudo dnf remove sdparm

References

Summary

In this tutorial we learn how to install sdparm on CentOS 7 using yum and dnf.