1sudo apt-get install curl
2curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
3sudo apt-get install nodejs
4# Check node version
5node -v
6# v13.9.0
7# Also, check the npm version
8npm -v
9# 6.13.7
1//STEP 1:install using curl (PPA)
2sudo apt update && sudo apt install curl -y
3//STEP 2:install latest version (replace 14.x with requird one(i.e 15.x))
4curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
5sudo apt install nodejs
6nodejs -v
7v15.3.0