Step 1 - Add NodeSource PPA
Let's begin by installing the NodeSource PPA. This will allow us to install later versions of NodeJS using the Apt package manager. Let's ensure we're in the home directory and download the setup script:
curl -sL https://deb.nodesource.com/setup_14.x -o setup_14.sh Next, let's run the setup which will add the NodeSource PPA:
sudo sh ./setup_14.shStep 2 - Install NodeJS
We will now have the NodeSource PPA added, allowing us to install NodeJS 14. First let's update the APT package library:
sudo apt updateAnd finally, install NodeJS 14:
sudo apt install nodejsStep 3 - Verify NodeJS version
We should now have NodeJS 14 installed. We will need to check the version installed, we can do this by running the following command:
node -vYou should see an output that shows NodeJS being at least 14.16
Conclusion
That's it! We've added NodeSource as a PPA, updated our Apt source list and installed NodeJS
