(Last Updated On: December 19, 2018)

Welcome to our guide on how to install Node.js 10 LTS on Ubuntu 18.04 / 16.04 / Debian 9. Node 10 became LTS version starting from Node v10.13.0. This LTS release of Node (Dubnium) will be supported until April 2020.

Installing Node.js 10 LTS on Ubuntu 18.04 / 16.04 / Debian 9

Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. To install Node.js 10.x LTS on Ubuntu 18.04 / 16.04 / Debian 9, Add NodeSource binary distributions repository.

curl -sL https://deb.nodesource.com/setup_10.x | sudo bash

This command will configure Node.js APT repository to your OS.

Install Node.js 10 LTS on Ubuntu 18.04 / 16.04 / Debian 9

After adding the repository, install Node.js 10 LTS  on Ubuntu 18.04 / 16.04 / Debian 9 using the apt package manager.

sudo apt update
sudo apt -y install gcc g++ make
sudo apt -y install nodejs

To install the Yarn package manager, run:

curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn

Confirm Node version

$ node -v
v10.13.0

Thanks for installing Node.js 10 LTS on Ubuntu 18.04 / 16.04 / Debian 9 with our guide. Stay connected for more interesting How-To guides and Infrastructure setups tutorials.