Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sudo: amazon-linux-extras: command not found

I tried to install sudo amazon-linux-extras install nginx1 but it is not working. I'm using MobaXterm to deploy node.js app to AWS EC2.

When I try the command sudo amazon-linux-extras install nginx, it ends up with sudo: amazon-linux-extras: command not found. I also tried the command sudo app update and sudo app install nginx1 but it does not work. Same thing also applies to sudo apt update. Can someone help me fix this issue?enter image description here

like image 936
Aswin Shaji Avatar asked Sep 09 '25 19:09

Aswin Shaji


2 Answers

Check the Amazon image version of your EC2 instance.

Command: cat /etc/image-id

If it is Amazon Linux 2023, it does not have extras.

However, most of the packages are already included in the distro.

You can run sudo yum install nginx which will install version 1.22

like image 86
User123456 Avatar answered Sep 12 '25 09:09

User123456


For Amazon Linux 2023 VM, follow the below steps

sudo yum update
sudo yum install stress

Generate CPU stress: stress --cpu <number-of-threads>

Generate memory stress: stress --vm <number-of-threads> --vm-bytes <memory-size>

Generate I/O stress: stress --io <number-of-threads>

Generate disk stress: stress --hdd <number-of-threads>

like image 22
learner Avatar answered Sep 12 '25 09:09

learner