How To Install grep.x86_64 on Amazon Linux 2

In this tutorial we learn how to install grep.x86_64 in Amazon Linux 2. grep.x86_64 is Pattern matching utilities

Introduction

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

What is grep.x86_64

The GNU versions of commonly used grep utilities. Grep searches through textual input for lines which contain a match to a specified pattern and then prints the matching lines. GNU’s grep utilities include grep, egrep and fgrep. GNU grep is needed by many scripts, so it shall be installed on every system.

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

Install grep.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 grep.x86_64 using yum by running the following command:

sudo yum -y install grep.x86_64

How To Uninstall grep.x86_64 on Amazon Linux 2

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

sudo yum remove grep.x86_64

grep.x86_64 Package Contents on Amazon Linux 2

/bin/egrep
/bin/fgrep
/bin/grep
/etc/GREP_COLORS
/etc/profile.d/colorgrep.csh
/etc/profile.d/colorgrep.sh
/usr/libexec/grepconf.sh
/usr/share/doc/grep-2.20
/usr/share/doc/grep-2.20/ABOUT-NLS
/usr/share/doc/grep-2.20/AUTHORS
/usr/share/doc/grep-2.20/COPYING
/usr/share/doc/grep-2.20/ChangeLog
/usr/share/doc/grep-2.20/NEWS
/usr/share/doc/grep-2.20/README
/usr/share/doc/grep-2.20/THANKS
/usr/share/doc/grep-2.20/TODO
/usr/share/info/grep.info.gz
/usr/share/locale/af/LC_MESSAGES/grep.mo
/usr/share/locale/be/LC_MESSAGES/grep.mo
/usr/share/locale/bg/LC_MESSAGES/grep.mo
/usr/share/locale/ca/LC_MESSAGES/grep.mo
/usr/share/locale/cs/LC_MESSAGES/grep.mo
/usr/share/locale/da/LC_MESSAGES/grep.mo
/usr/share/locale/de/LC_MESSAGES/grep.mo
/usr/share/locale/el/LC_MESSAGES/grep.mo
/usr/share/locale/eo/LC_MESSAGES/grep.mo
/usr/share/locale/es/LC_MESSAGES/grep.mo
/usr/share/locale/et/LC_MESSAGES/grep.mo
/usr/share/locale/eu/LC_MESSAGES/grep.mo
/usr/share/locale/fi/LC_MESSAGES/grep.mo
/usr/share/locale/fr/LC_MESSAGES/grep.mo
/usr/share/locale/ga/LC_MESSAGES/grep.mo
/usr/share/locale/gl/LC_MESSAGES/grep.mo
/usr/share/locale/he/LC_MESSAGES/grep.mo
/usr/share/locale/hr/LC_MESSAGES/grep.mo
/usr/share/locale/hu/LC_MESSAGES/grep.mo
/usr/share/locale/id/LC_MESSAGES/grep.mo
/usr/share/locale/it/LC_MESSAGES/grep.mo
/usr/share/locale/ja/LC_MESSAGES/grep.mo
/usr/share/locale/ko/LC_MESSAGES/grep.mo
/usr/share/locale/ky/LC_MESSAGES/grep.mo
/usr/share/locale/lt/LC_MESSAGES/grep.mo
/usr/share/locale/nb/LC_MESSAGES/grep.mo
/usr/share/locale/nl/LC_MESSAGES/grep.mo
/usr/share/locale/pa/LC_MESSAGES/grep.mo
/usr/share/locale/pl/LC_MESSAGES/grep.mo
/usr/share/locale/pt/LC_MESSAGES/grep.mo
/usr/share/locale/pt_BR/LC_MESSAGES/grep.mo
/usr/share/locale/ro/LC_MESSAGES/grep.mo
/usr/share/locale/ru/LC_MESSAGES/grep.mo
/usr/share/locale/sk/LC_MESSAGES/grep.mo
/usr/share/locale/sl/LC_MESSAGES/grep.mo
/usr/share/locale/sr/LC_MESSAGES/grep.mo
/usr/share/locale/sv/LC_MESSAGES/grep.mo
/usr/share/locale/th/LC_MESSAGES/grep.mo
/usr/share/locale/tr/LC_MESSAGES/grep.mo
/usr/share/locale/uk/LC_MESSAGES/grep.mo
/usr/share/locale/vi/LC_MESSAGES/grep.mo
/usr/share/locale/zh_CN/LC_MESSAGES/grep.mo
/usr/share/locale/zh_TW/LC_MESSAGES/grep.mo
/usr/share/man/man1/egrep.1.gz
/usr/share/man/man1/fgrep.1.gz
/usr/share/man/man1/grep.1.gz

References

Summary

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