aws, amazon linux 2,

Install Sudo on Amazon Linux 2

Nov 15, 2022 · 1 min read · Post a comment

Some of the Amazon Linux 2 images are missing very basic system commands like sudo. If you get this error /bin/sh: sudo: command not found then you definitely need to install sudo on Amazon Linux 2.

Prerequisites

  • Amazon Linux 2

Install Sudo on Amazon Linux 2

Step 1. Update the system packages.

yum update

Step 2. Install Sudo.

yum install sudo

Step 3. Once the installation is done you can use sudo command.

sudo yum update

Conclusion

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