Search code examples
djangoamazon-web-servicescommandsudoapt

"sudo: apt: command not found" when trying to deploy a django app with aws


I am trying to deploy my first Django app with AWS. I did everything until I reached the step of using sudo in the ec2 environmental setup. when I try to run sudo apt update I get sudo: apt: command not found.

enter image description here

What can I do to solve this?


Solution

  • You are using Amazon Linux 2023, which uses yum (or now dnf as well). apt is for Ubuntu. So you have to use dnf in your case.

    sudo dnf update