aws, amazon linux 2,

How to Install locate on Amazon Linux 2

Jun 17, 2023 · 1 min read · Post a comment

Let’s take a look on how to install locate on Amazon Linux 2. The steps are quick and easy.

Prerequisites

  • Amazon Linux 2
  • sudo privileges

Install locate on Amazon Linux 2

Step 1. Update the Amazon Linux 2 packages.

sudo yum update -y

Step 2. Install the mlocate package, which includes the locate command, by running the following command.

sudo yum install mlocate

Step 3. To update the index run.

updatedb

Step 4. Verify the installation.

locate example.txt

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.