How To Install lsof.x86_64 on Amazon Linux 2

In this tutorial we learn how to install lsof.x86_64 in Amazon Linux 2. lsof.x86_64 is A utility which lists open files on a Linux/UNIX system

Introduction

In this tutorial we learn how to install lsof.x86_64 on Amazon Linux 2.

What is lsof.x86_64

Lsof stands for LiSt Open Files, and it does just that information about files that are open by the processes running on a UNIX system.

We can use yum to install lsof.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install lsof.x86_64.

Install lsof.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install lsof.x86_64 using yum by running the following command:

sudo yum -y install lsof.x86_64

How To Uninstall lsof.x86_64 on Amazon Linux 2

To uninstall only the lsof.x86_64 package we can use the following command:

sudo yum remove lsof.x86_64

lsof.x86_64 Package Contents on Amazon Linux 2

/usr/sbin/lsof
/usr/share/doc/lsof-4.87
/usr/share/doc/lsof-4.87/00.README.FIRST
/usr/share/doc/lsof-4.87/00.README.FIRST_4.87
/usr/share/doc/lsof-4.87/00CREDITS
/usr/share/doc/lsof-4.87/00DCACHE
/usr/share/doc/lsof-4.87/00DIALECTS
/usr/share/doc/lsof-4.87/00DIST
/usr/share/doc/lsof-4.87/00FAQ
/usr/share/doc/lsof-4.87/00LSOF-L
/usr/share/doc/lsof-4.87/00MANIFEST
/usr/share/doc/lsof-4.87/00PORTING
/usr/share/doc/lsof-4.87/00QUICKSTART
/usr/share/doc/lsof-4.87/00README
/usr/share/doc/lsof-4.87/00TEST
/usr/share/doc/lsof-4.87/00XCONFIG
/usr/share/doc/lsof-4.87/README.lsof_4.87
/usr/share/man/man8/lsof.8.gz

References

Summary

In this tutorial we learn how to install lsof.x86_64 on Amazon Linux 2 using yum.