How To Install Node.js Latest Version on Debian 7/8/9

Detailed steps to install the Node.js environment on Debian.

What is Node.js?

Node.js is a JavaScript execution environment which has been developed with the Chrome V8 JavaScript engine offering significant benefits and advantages for all users of these applications.

Method PPA: Install Node.js

The first option we have for the installation of Node.js is using the PPA (personal package file) directly from the developer which guarantees us to have the latest stable version and is the simplest and fastest method.

To install Node.js using this method we will execute the following commands:

For Latest Version:

sudo apt-get install curl python-software-properties
curl -sL | sudo bash -

For LTS Version:

sudo apt-get install curl python-software-properties
curl -sL | sudo bash -

Method NVM: Install Node.js

NVM is a tool that has been designed to install Node.js safely and efficiently on Debian. NVM stands for Node.js Version Manager.

Thanks to NVM we will have more control over the different versions of Node.js allowing us to obtain higher benefits and competitiveness.

To start, we will execute the following commands with which we will update the system and install the necessary packages.

sudo apt-get update

sudo apt-get install build-essential libssl-dev

Once the packages are downloaded, we proceed to download the NVM script from the official page by executing the following command:

curl -sL -o

We will be able to visualize the content of the script running the following command:


Execute the script using the next line. In this way we have installed NVM in Debian and Node.js will be installed in the path ~ / .nvm


For NVM to be efficiently executed, it will be necessary to close the session and start it again or run the line

source ~/.profile

If we want to know the versions of Node.js available to be installed, we must execute the following command:

nvm ls-remote

The latest stable version (LTS) is 8.9.4, to install it we will run the following:

nvm install 8.9.4

To know the current version of Node.js, we will execute the command node -v.

We have two simple and fully functional alternatives to install Node.js in Debian 7/8/9 and take full advantage when creating multiple applications with JavaScript.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *