How to install Node.js on Ubuntu 16.04. Terminal commands to install Node.js on Linux Ubuntu Systems, via package manager (PPA). Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine.
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
Ubuntu 16.04 users can install Node.js. Please note that the Ubuntu 16.04 System already contains a version of Node.js in its default repositories. Run the following commands to install Node.js on Ubuntu:
sudo apt-get update
sudo apt-get install nodejs
Ubuntu 16.04 users can also install npm (Node.js package manager). To install, run the following command:
sudo apt-get install npm
The Node.js package manager allows to install modules and packages that can be easily used with Node.js.
Install Node.js on Ubuntu 16.04
Ubuntu 16.04 users can install the latest version of Node.js, via PPA. Node.js is available from the NodeSource Debian and Ubuntu binary distributions repository (formerly Chris Lea’s Launchpad PPA).
Run the following command to install Node.js, via PPA on Ubuntu:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
Now run the following command to install build tools. The build tools is used to compile and install native addons from npm:
sudo apt-get install -y build-essential