Search code examples
unixlinux-kernelrhelapt-get

How to install apt-get package in Amazon Linux machine


How to install apt-get in amazon linux machine,using yum or wget ,i searched extensively but didnt find relvant ..getting below message

[ec2-user@ip-172-31-33-94 ~]$ sudo apt-get update -y && sudo apt-get install -y 
linux-image-extra-$(uname -r)
sudo: apt-get: command not found

Solution

  • well figured out these commands hence answering,these commands will install apt-get and run docker as ec2 user

    sudo yum update -y
    sudo amazon-linux-extras install docker
    sudo service docker start
    sudo usermod -a -G docker ec2-user
    docker info
    docker run -it --rm tarunkumard/gatling:FirstScript