Install NodeJS on Amazon Linux 2

Apr 09, 2022 · 1 min read · Post a comment
Install NodeJS on Amazon Linux 2

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


  • Amazon Linux 2
  • sudo access

Install NodeJS on Amazon Linux 2

Step 1. Firstly, install some node js dependencies.

sudo yum install gcc-c++ make

Step 2. Download the node source repo for the installation.

curl -sL | sudo -E bash -

Step 3. Install node js.

sudo yum install nodejs

Step 4. Verify the installation.

node -v

Example output:



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