apt command not found - Amazon Linux

Page content

How to Install apt Command on Amazon Linux

If you are using Amazon Linux and trying to use the apt command but getting a “command not found” error, that’s because Amazon Linux uses the yum package manager instead of apt. However, you can still install and use apt on Amazon Linux by following the steps below.

Step 1: Update Package Index

Before installing any new packages, it’s a good practice to update the package index to ensure you are installing the latest versions available.

sudo yum update

Step 2: Install apt

You can install the apt package manager on Amazon Linux using the following command:

sudo yum install apt

Step 3: Start Using apt

Once the installation is complete, you can start using apt as you would on other Linux distributions. You can now use commands like apt update, apt install, apt remove, etc.

Conclusion

Although Amazon Linux does not come with apt pre-installed, you can easily install it and use it for package management on your system. By following the steps outlined in this tutorial, you can enjoy the convenience and familiarity of apt on your Amazon Linux instance.