Hello dear friends. NodeJS technology is one of the most used technologies on the internet. Besides this, it is the basis of many interesting applications that exist. So, in this post, you will learn how to install NodeJS on Debian 11. For this, we will show you two different methods.
Many important forms such as Linkedin or eBay were created using this technology. This shows us the power of NodeJS.
As NodeJS is widely supported on Linux, it is common to find it in the official repositories of almost any distribution. In this case, it is also available from the official Debian 11 repositories so the installation becomes easier.
So, open a terminal emulator or connect via SSH to Debian 11 and update it first:
sudo apt update sudo apt upgrade
Now, you can install NodeJS as follows
sudo apt install nodejs
This way, you will be shown many of the dependencies to install. Although there are a lot of them, the reality is that the installation will be very fast.
When finished, you can check the installed version with the command:
node --version v12.22.5
This is the fastest and safest way to install NodeJS, but it is not the only one, nor is it necessarily the best.
By adding an external repository, it is possible to install a recent version of NodeJS. At the time of writing this post, the
14.x branch is the LTS branch, i.e. the one recommended for production environments, and the
16.x branch is the most recent one. We can install them in both cases.
So, if you already have NodeJS installed, uninstall it as follows:
sudo apt remove nodejs
And to install the LTS series (currently
14.x) run these commands:
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash - sudo apt install nodejs
But if you want to install the latest version of NodeJS which is currently
16.7.0 then run these commands:
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo bash - sudo apt install nodejs
In any case, you can choose the one you like the most, and when finishing check the version installed with the command
This way NodeJS will be installed on your system and ready for whatever you need.
NodeJS is a cutting-edge technology for the development of web applications. In this post, you have learned two different ways to install it on Debian 11
Please share this post with your friends and join our Telegram channel.