Skip to content

Instantly share code, notes, and snippets.

@ToanPV90
Created March 18, 2019 05:55
Show Gist options
  • Save ToanPV90/6a0553e11df3319d4baa14d270110ea4 to your computer and use it in GitHub Desktop.
Save ToanPV90/6a0553e11df3319d4baa14d270110ea4 to your computer and use it in GitHub Desktop.
Step 1 – Add Node.js PPA
Node.js package is available in LTS release and the current release. It’s your choice to select which version you want to install on the system as per your requirements. Let’s add the PPA to your system to install Nodejs on Ubuntu.
Use Current Release: At te last update of this tutorial, Node.js 11.4.0 is the current Node.js release available.
sudo apt-get install curl python-software-properties
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
Use LTS Release : At the last update of this tutorial, Node.js 10.14.1 is the LTS release available.
sudo apt-get install curl python-software-properties
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
For this tutorial, I am using the latest current release and added their PPA to my system.
======================================================================================================
Step 2 – Install Node.js on Ubuntu
You can successfully add Node.js PPA to Ubuntu system. Now execute the below command install Node on and Ubuntu using apt-get. This will also installed NPM with node.js. This command also installs many other dependent packages on your system.
sudo apt-get install nodejs
======================================================================================================
Step 3 – Test Node.js and NPM Version
After installing node.js verify and check the installed version. You can find more details about current version on node.js official website.
node -v
v11.8.0
Also, check the npm version
npm -v
6.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment