Install without command line

  • For npm and NodeJS, download and install here.

Install with command line

Install npm,

# linux
sudo apt install npm
# check version
npm -v

Install nodejs,

# linux
sudo apt install nodejs
# update
sudo npm install n -g
sudo n stable
# if there are more than 2 versions
# refresh to the newest
PATH="$PATH"
# check version
node -v

Notes with this notation aren't good enough. They are being updated.