Site icon GetCodify

How to install node.js in ubuntu

NodeJS

Install node.js in ubuntu. Currently, the node.js is one of the most popular server-side javascript engines with compiles javascript code at the server-side.

Pre-requisites before installation:

Please do check your ubuntu version and the latest stable release is installed.

Steps to install node.js

1# Step: At first please update/ refresh your ubuntu using the apt package manager.

$ sudo apt update

2# Step: Installing node from the ubuntu repository.

$ sudo apt install nodejs

3# Step: After node.js installation at most of the cases you might also need to install npm (node package manager) in windows when you install node by default npm will also be installed. But here in ubuntu, you have to install node.js and npm seperately.

$ sudo apt install npm

That’s it, Node and npm installed. To verify the installation of the node.js you just have follow below step.

//this will return the current nodejs installation version.
$ nodejs -v  

// this will return the current npm installation version.
$ npm -v  

Removing Nodejs

To remove you just have to follow the below steps.

1# Step: To remove the distro-stable version

$ sudo apt remove nodejs

2# Step: To uninstall the package and remove configurations and files.

$ sudo apt purge nodejs

If you have any doubt, please comment down below.

Exit mobile version