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:
sudo dnf update -y && sudo dnf upgrade -y
Install NodeJS prerequisites
Before we proceed with the installation, we will install some required prerequisites:
sudo dnf install tar curl dnf-plugins-core -y
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:
dnf install nodejs
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:
[root@host ~]# dnf install nodejs
Last metadata expiration check: 0:01:23 ago on Tue Mar 25 07:54:43 2025.
Dependencies resolved.
========================================================================================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================================================================================
Installing:
nodejs x86_64_v2 1:22.4.1-3.el10 appstream 42 k
Installing dependencies:
libuv x86_64_v2 1:1.48.0-2.el10 appstream 252 k
nodejs-libs x86_64_v2 1:22.4.1-3.el10 appstream 19 M
Installing weak dependencies:
nodejs-docs noarch 1:22.4.1-3.el10 appstream 8.5 M
nodejs-full-i18n x86_64_v2 1:22.4.1-3.el10 appstream 8.4 M
nodejs-npm x86_64_v2 1:10.8.1-1.22.4.1.3.el10 appstream 2.2 M
Transaction Summary
========================================================================================================================================================================================
Install 6 Packages
Total download size: 38 M
Installed size: 201 M
Is this ok [y/N]:
Once the installation is completed, check the installed version with the command below:
node -v
You should get the following output:
[root@host ~]# node -v v22.4.1
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:
npm -v
You will receive the following output:
[root@host ~]# npm -v 10.8.1
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:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash source ~/.bashrc
Once installed, you can check the version of the NVM:
nvm -v
You should get the following output:
[root@host ~]# nvm -v 0.40.2
Now, when NVM is installed, you can list every NodeJS version with the following command:
nvm ls-remote
The list will be very long:
. . . v14.21.3 (Latest LTS: Fermium) v15.0.0 v15.0.1 v15.1.0 . . . v16.19.1 (LTS: Gallium) v16.20.0 (LTS: Gallium) v16.20.1 (LTS: Gallium) v16.20.2 (Latest LTS: Gallium) . . . v22.10.0 v22.11.0 (LTS: Jod) v22.12.0 (LTS: Jod) v22.13.0 (LTS: Jod) v22.13.1 (LTS: Jod) v22.14.0 (Latest LTS: Jod) . . . v23.8.0 v23.9.0 v23.10.0
For example, to install the NodeJS version v16.20.1, you can execute the following nvm command:
nvm install 16.20.1
After successful installation of this older NodeJS version, you will receive output similar to this:
[root@host ~]# nvm install 16.20.1 Downloading and installing node v16.20.1... Local cache found: ${NVM_DIR}/.cache/bin/node-v16.20.1-linux-x64/node-v16.20.1-linux-x64.tar.xz Checksums match! Using existing downloaded archive ${NVM_DIR}/.cache/bin/node-v16.20.1-linux-x64/node-v16.20.1-linux-x64.tar.xz Now using node v16.20.1 (npm v8.19.4) Creating default alias: default -> 16.20.1 (-> v16.20.1)
To install the latest LTS NodeJS 22, execute the following command:
nvm install 22.14.0
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:
nvm ls
You should receive output similar to this:
[root@host ~]# nvm ls v16.20.1 v18.20.7 v20.19.0 -> v22.14.0 system default -> 16.20.1 (-> v16.20.1) iojs -> N/A (default) unstable -> N/A (default) node -> stable (-> v22.14.0) (default) stable -> 22.14 (-> v22.14.0) (default) lts/* -> lts/jod (-> v22.14.0) lts/argon -> v4.9.1 (-> N/A) lts/boron -> v6.17.1 (-> N/A) lts/carbon -> v8.17.0 (-> N/A) lts/dubnium -> v10.24.1 (-> N/A) lts/erbium -> v12.22.12 (-> N/A) lts/fermium -> v14.21.3 (-> N/A) lts/gallium -> v16.20.2 (-> N/A) lts/hydrogen -> v18.20.7 lts/iron -> v20.19.0 lts/jod -> v22.14.0
As you can see in our example, there are four installed NodeJS versions, and the current NodeJS is v22.14.0
v16.20.1 v18.20.7 v20.19.0 -> v22.14.0
To use, for example, NodeJS v18.20.7, execute the command below:
nvm use 18.20.7
You should get the following confirmation message:
[root@host ~]# nvm use 18.20.7 Now using node v18.20.7 (npm v10.8.2
To remove a specific version, such as v20.19.0, execute the command below:
nvm uninstall 20.19.0
The confirmation message about the removal would be the following:
[root@host ~]# nvm uninstall 20.19.0 Uninstalled node v20.19.0
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.