sudo apt-get update sudo apt-get install git-core curl build-essential openssl libssl-dev python
git clone https://github.com/nodejs/node.git cd node
NOTE: If you require a specific version of Node:
git tag # Gives you a list of released versions git checkout v13.10.1
./configure make sudo make install
NOTE: This might take a while, depending on your hardware.
node -v
curl -L https://npmjs.org/install.sh | sudo sh
WARNING: Running a script directly from the web can be dangerous, as it may contains trojans.
Instead, you may want to download the script, and then review the contents before actually installing it.
npm -v