Mondoze Knowledge Base

Search our articles or browse by category below

4 Easy Steps On Installing Node.js in Your Ubuntu Linux VPS Server

Last modified: October 7, 2022
You are here:
Estimated reading time: 1 min

Node.js has proven itself as an advanced development framework for web hosting by being used in multiple areas such as chat applications, browser games, streaming applications, back-end tools, and so on. Web hosting is mainly used on the Linux VPS server, so this will be a guide on how to install Node.js onto your server. Do note that this guide here is based on the Ubuntu OS, so if you are using another Linux OS, it may not work.

Step 1: Update Ubuntu VPS Server

It is highly recommended to update the package index for the Ubuntu virtual server before installing Node.js. Follow the command below to update it.

sudo apt-get update

Step 2: Install Node.js

You can easily install Node.js with a single command. The reason for this is due to Node.js being a part of Ubuntu’s official repository. Do note that using the following command only install the latest version of the Node.js package. If you need a specific version of Node.js, then this isn’t for you.

sudo apt-get install nodejs

Step 3: Install npm

Similar to Node.js, npm can be easily installed in a single command.

sudo apt-get install npm

Step 4: Verifying Installation

Installation is mostly done by this step, all that is left is to verify if the installations are successful and what version of Node.js and npm you are currently using.

Use the following command for Node.js.

node -v

Use the following command for npm.

npm -v

You should be able to see the version number of both Node.js and npm at the output. Congratulations, your Node.js is now ready to be used on your web server.

Was this article helpful?
Dislike 0
Views: 62