How to Install Node.js on Debian 10

Install Node.js on Debian 10

In this article, we will have explained the necessary steps to install and configure Node.js on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Node.js is a cross-platform JavaScript run-time environment built on Chrome’s JavaScript designed to execute JavaScript code on the server-side. With Node.js, you can build scalable network applications. Node.js runs on Linux, Windows and macOS.

Install Node.js on Debian

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install Node.js on Debian 10.

  • Installing Node.js from the official Debian 10 package repository with the following command:

One the installation is completed, verify it by typing:

  • Installing Node.js and npm using NVM:

The installation script clones the nvm repository from Github to the ~/.nvm directory and adds the nvm path to your Bash or ZSH profile:

Check nvm version and confirm installation typing:

Now install Node.js by using the following command:

Verify Node.js installation by typing:

Step 3. Uninstalling Node.js.

If for some reasons you want to uninstall Node.js and npm packages, use the following command:

Congratulation, you have learned how to install and configure Node.js on Debian 10 Buster. If you have any question, please leave a comment below.