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.
- Amazon Linux 2
Install Sudo on Amazon Linux 2
Step 1. Update the system packages.
Step 2. Install Sudo.
yum install sudo
Step 3. Once the installation is done you can use
sudo yum update
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.