
This blog post will show you how to install Node.js on AlmaLinux 10 OS version—the latest version of AlmaLinux. NodeJS is an open-source cross-platform JavaScript runtime compatible with multiple OSs, such as Windows, Unix, macOS, and Linux. We will stick with Linux, especially AlmaLinux 10. NodeJS offers a variety of features and lets developers use Java for command-line tools and server-side scripting. As we mentioned, it is compatible with JavaScript. It is good to note that Node.js, except for JavaScript, is also written in C, C++, and Python.
In the following paragraphs, we will show you two different ways of installing NodeJS on AlmaLinux 10. Every installation is straightforward and should not take more than 10 minutes. Let’s get things done!
Table of Contents
Prerequisites
- A server running AlmaLinux 10 or any Linux OS
- User privileges: root or non-root user with sudo privileges
Update the system
Before installing NodeJS, we must update the system packages to the latest versions. To do that, execute the following command:
Install NodeJS prerequisites
Before we proceed with the installation, we will install some required prerequisites:
Install NodeJS using DNF
Dnf is a package manager used in recent versions of AlmaLinux OS, similar to the yum package manager. The NodeJS package is available by default in the latest AlmaLinux 10 OS, so to install it, you can execute the following command:
The system will list the default installation version and ask you to confirm if you want to proceed with the installation by typing Y for yes or N for No. Type y to proceed with the installation:
Once the installation is completed, check the installed version with the command below:
You should get the following output:
As you can see on the latest AlmaLinux 10, the latest NodeJS version is 22. Along with NodeJS, NPM is installed as a package manager for the JavaScript programming language. To check the version of the NPM, execute the following command:
You will receive the following output:
Install NodeJS using NVM
NVM is a shortcut for Node Version Manager used to easily install Node.js by listing the NodeJS versions and choosing the one you want. First, we need to install the NVM manager using the following commands:
Once installed, you can check the version of the NVM:
You should get the following output:
Now, when NVM is installed, you can list every NodeJS version with the following command:
The list will be very long:
For example, to install the NodeJS version v16.20.1, you can execute the following nvm command:
After successful installation of this older NodeJS version, you will receive output similar to this:
To install the latest LTS NodeJS 22, execute the following command:
Managing Multiple NodeJS versions with NVM
To manage multiple NodeJS versions, first, we must check if multiple versions are installed on the server. To do that, execute the following command:
You should receive output similar to this:
As you can see in our example, there are four installed NodeJS versions, and the current NodeJS is v22.14.0
To use, for example, NodeJS v18.20.7, execute the command below:
You should get the following confirmation message:
To remove a specific version, such as v20.19.0, execute the command below:
The confirmation message about the removal would be the following:
That’s it. You successfully installed NodeJS and learned to manage multiple NodeJS versions on the latest AlmaLinux 10 OS.
Of course, you don’t have to install NodeJS on AlmaLinux 10 if you have difficulties and are unfamiliar with Linux. You can always contact our technical support. You only need to sign up for one of our NVMe Linux VPS plans and submit a support ticket. We are available 24/7 and will take care of your request immediately.
If you liked this post on how to install Node.js on AlmaLinux 10, please share it with your friends or leave a comment down below.