In this tutorial we will learn to install Node and NPM on Ubuntu.
NPM is Node Package Manager and it is used to install and manage Node packages.
Click here to install Node and NPM on macOS.
Let's install Node and NPM on our Ubuntu computer.
You can head over to nodejs.org and download the latest release of Node for your Linux computer or you can run the following commands in the terminal to install Node. I personally prefer the terminal approach.
We will be using the apt package manager to install Node and NPM.
Before we start installing Node and NPM let us go ahead and update the packages. So, open Terminal and type the following command.
$ sudo apt update
In the above command we are using sudo so, you will be prompted to enter your password.
Now run the following command to install Node.
$ sudo apt install nodejs
Now run the following command in the terminal to install NPM the Node Package Manager.
$ sudo apt install npm
On successful installation you will be able to check the Node and NPM version by typing the following command.
Type the following command to check the Node version.
$ node -v
Type the following command to check the NPM version.
$ npm -v
At the time of writing this tutorial I was using Node v8.10.0 and NPM v6.1.0. You may have the latest version and that is totally fine.
To update NPM to the latest version you can use the following command.
$ sudo npm i -g npm
To remove Node run the following command.
$ sudo apt purge nodejs
Alright, you now have Node and NPM installed on your Ubuntu machine. Have fun developing :-)
Have fun learning :-)
Copyright © 2014 - 2019 DYclassroom. All rights reserved.
rendered in 0.0159 sec