Here I showing the basic command for installing the Node JS on Linux instance
Install node version manager (nvm) by typing the following at the command line
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
#We will use nvm to install Node.js because nvm can install multiple versions of Node.js and allow you to switch between them.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Activate nvm by typing the following at the command line.
. ~/.nvm/nvm.sh
Use nvm to install the latest version of Node.js by typing the following at the command line.
nvm install node
#check node version
node –v