How To Install sg3_utils on CentOS 7

In this tutorial we learn how to install sg3_utils on CentOS 7. sg3_utils is Utilities for devices that use SCSI command sets

Introduction

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

What is sg3_utils

Collection of Linux utilities for devices that use the SCSI command set. Includes utilities to copy data based on “dd” syntax and semantics (called sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check mode and log pages (sginfo, sg_modes and sg_logs); spin up and down disks (sg_start); do self tests (sg_senddiag); and various other functions. See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4 series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0) must be used. In the 2.6 series other device names may be used as well (e.g. /dev/sda). Warning and the incorrect usage of them may render your system inoperable.

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

Install sg3_utils on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install sg3_utils

Install sg3_utils 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 sg3_utils using dnf by running the following command:

sudo dnf -y install sg3_utils

How To Uninstall sg3_utils on CentOS 7

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

sudo dnf remove sg3_utils

References

Summary

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