Setting up Node.js environment on Ubuntu (Part-1)

Akash Jadhav
2 min readJun 3, 2019

--

Introduction -
Follow the following steps to install nodejs environment on Ubuntu machine

If you haven’t checked out my tutorial about Node.js Tutorials Summary (Part-0) follow the link below to know the list of all node.js tutorials available and their end results -
https://medium.com/@akash_jadhav/node-js-tutorials-part-0-a48b44bb3b6e

Note — All below commands are to be executed in terminal

Step 1 — Check if node.js is already present on your machine using below command. If it displayed version number, then node.js is present on your machine else it is not.

nodejs -v

Step 2 — If Node.js is not present on your machine continue further.

Step 3 — Adding node PPA (Personal Package Archive). There are two types of node packages available -
a) Current release (latest version of node — currently its 12.3.1)
b) LTS release (Long Term Support release / stable version of node)

a) To install Current release, input the following commands in terminal

sudo apt-get install curl python-software-properties
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

b) To install LTS/Stable release, input the following commands in terminal

sudo apt-get install curl python-software-properties
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

Step 4 — Installing node to the machine. Along with Node.js, NPM(Node Package Manager) also gets installed automatically.

sudo apt-get install nodejs

Step 5 — Now check if node & npm is present on your system using below commands. The result should be version number of node and npm.

nodejs -v
npm -v

Hurrah!! you have successfully installed Nodejs environment.
Welcome to Node.js!
Now you can start your journey in Node World and don’t forget to clap.
Best Luck and Happy Nodeing!!

Visit the link for next Node.js tutorial -
https://medium.com/@akash_jadhav/getting-started-with-node-js-305ca4e5ab55

--

--