node.js, aws, amazon linux 2,

Install Node.js on Amazon Linux 2

Apr 09, 2022 · 1 min read · Post a comment

Node.js doesn’t exist in the default Amazon Linux 2 yum packages. So we should add the Node.js official repo and use it for the installation. Let’s see how to install Node.js on Amazon Linux 2.


  • Amazon Linux 2
  • sudo privileges

Install Node.js on Amazon Linux 2

Step 1. First, install some Node.js dependencies.

sudo yum install gcc-c++ make

Step 2. Download the Node.js source repo for the installation.

curl -sL | sudo -E bash -

Step 3. Install Node.js.

sudo yum install nodejs

Step 4. Verify installation.

node -v




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