Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tidalgo22/d7ae7fa298247d6e98b349ffd4e3e591 to your computer and use it in GitHub Desktop.
Save tidalgo22/d7ae7fa298247d6e98b349ffd4e3e591 to your computer and use it in GitHub Desktop.
Installation of latest node.js on ubuntu 16.04 & 14.04
Step 1: Add Nodejs PPA
Node.js is available in two versions, first is current (most recent version) and another is LTS. Select which version you need to install on the system. Then use one of following commands to install PPA on your system. Node.js officially provides these PPA’s.
Use Current Release: At te last update of this tutorial, Node.js 8.0 is the current Node.js release available.
Command:
$ sudo apt-get install python-software-properties
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
Use LTS Release : At te last update of this tutorial, Node.js 6.11 is the LTS release available.
Command:
$ sudo apt-get install python-software-properties
$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
Note: the /setup_6.x on the curl are the version you can edit it for desired version
For this tutorials, we are using latest current release and added their PPA to my system.
Step 2: Install Nodejs and NPM
After adding required PPA file lets install Node package. NPM will also be installed with node.js. This command will also install many other dependent packages on your system.
Command:
$ sudo apt-get install nodejs
Step 3: Check 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.
Command:
$ node -v
v8.2.1
$ npm -v
5.3.0
Reference : https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment