This article will guide you to install Node.js latest version on Ubuntu 19.04, 18.04, 16.04 LTS and Debian:
Supported Ubuntu versions:
Supported Debian versions:
First, you’ll want to make sure that you have curl
installed. Doesn’t hurt to run an update while you’re in there as well:
sudo apt-get update
sudo apt-get install curl
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_13.x | bash -
apt-get install -y nodejs
# 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
# 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
# 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
# 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
use sudo
on Ubuntu or run this as root on debian
apt-get install -y build-essential
If you already have Node.js installed, don’t worry, that command will just upgrade the current version to the latest version.
To confirm that everything worked as expected, just spit out the version from the node
command to confirm:
node --version
That’s all there is to it! Now you’re running the latest version of Ubuntu or Debian and the latest version of Node.js.
#node #node-js #nodejs #ubuntu