Linux nodesource install
Installation instructions
Node.js v12.x:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
Node.js v11.x:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_11.x | bash -
apt-get install -y nodejs
Node.js v10.x:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs
Node.js v8.x:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs
Optional: install build tools
To compile and install native addons from npm you may also need to install build tools:
# use `sudo` on Ubuntu or run this as root on debian
apt-get install -y build-essential
Manual installation
If you’re not a fan of curl <url> | bash -
, or are using an unsupported distribution, you can try a manual installation.
These instructions assume sudo
is present, however some distributions do not include this command by default, particularly those focused on a minimal environment. In this case, you should install sudo
or su
to root to run the commands directly.