Install NodeJS 16 on Ubuntu 20.04

Learn how to install NodeJS 16 on Ubuntu 20.04 in this quick tutorial.

Install NodeJS 16 on Ubuntu 20.04

This tutorial will guide you through the very quick process of installing NodeJS 16 on Ubuntu 20.04. By default, the highest version of NodeJS you can install on Ubuntu 20.04 is 10.09.

Other articles in this series:

Step 1 - Add NodeSource PPA

This command will add PPA sources required to be able to install NodeJS 16 on your Ubuntu 20.04 installation:

curl -s https://deb.nodesource.com/setup_16.x | sudo bash

When complete, you will see a confirmation that looks like this:

Add PPA sources to install NodeJS 16 on Ubuntu 20.04
Add PPA sources to install NodeJS 16 on Ubuntu 20.04

Step 2 - Install NodeJS 16

Now that the PPA source has been added, we can install NodeJS 16 on our Ubuntu 20.04 installation. Run the following command:

sudo apt install nodejs -y
Tip: The -y flag means we're not prompted to confirm our choices

Once the installation is complete, we're ready to confirm the version installed.

Step 3 - Confirm the installed version of NodeJS

Finally, let's confirm the installed version. Run the following command:

node -v

You should get an output similar to the one show below. If you do, you've successfully installed NodeJS 16 on Ubuntu 20.04.

NodeJS 16 successfully installed on Ubuntu 20.04
NodeJS 16 successfully installed on Ubuntu 20.04

Feel free to provide feedback in the comments.