Table of Contents
In one of the previous article, I had already shown How to Install the latest version of Node.js on Ubuntu/Debian but that method was based on downloading and compiling latest node.js source code and then installing from compiled object files. Although this is the most recommended way but sometimes that method can take more time due to compilation of source code and generation of binary. So I thought to explain another method which tends to take very less time and can be easily used by everyone. So in this article, we will see how to install latest version of node.js on Ubuntu or Debian linux using NVM(Node version manager).

How to Install latest version of Node.js on Ubuntu or Debian Linux
Also Read: How to Install Claude Code on Linux
Step 1: Prerequisites
a) You should have a running Ubuntu or Debian System.
b) You should have sudo access to install application in your System.
c) You should have curl utility available in your System.
d) You should have internet connection available in your System.
Step 2: Update Your System
Before proceeding further, it is mandatory to install all available updates in your system using sudo apt update && sudo apt upgrade command as shown below. This will ensure all requires dependencies are checked and installed in the system.
cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
Step 3: Install NVM
You can visit GitHub repo and get the installation script to install latest available version of nvm from there. You just have to run below curl command to download and install nvm utility on your system.
cyberithub@ubuntu:~$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17883 100 17883 0 0 75542 0 --:--:-- --:--:-- --:--:-- 75775
=> Downloading nvm from git to '/home/cyberithub/.nvm'
=> Cloning into '/home/cyberithub/.nvm'...
remote: Enumerating objects: 483, done.
remote: Counting objects: 100% (483/483), done.
remote: Compressing objects: 100% (408/408), done.
remote: Total 483 (delta 68), reused 245 (delta 49), pack-reused 0 (from 0)
Receiving objects: 100% (483/483), 510.13 KiB | 1.93 MiB/s, done.
Resolving deltas: 100% (68/68), done.
* (HEAD detached at FETCH_HEAD)
master
=> Compressing and cleaning up git repository
=> Appending nvm source string to /home/cyberithub/.bashrc
=> Appending bash_completion source string to /home/cyberithub/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Step 4: Update Current Session
Since nvm installation updates some of the system environment variables, it is mandatory to update current terminal session to reflect those changes by using source ~/.bashrc command. This command would basically read .bashrc file again and apply all the changes from there to current running session hence preventing the need to close the current session and open a new one to read all the updated changes from .bashrc file present under user's home path.
cyberithub@ubuntu:~$ source ~/.bashrc
Step 5: Install latest Node.js
There are two ways to install latest node.js version. In the first method, you can install the latest available stable version which may not be the absolute latest version and in the second method you can install the absolute available version which may not be the stable version but more like a latest version with all the latest available features. So depending on your requirement you can choose either of the method.
a) Install Latest Stable Version(LTS)
Now that nvm is installed, it can now be used to install latest stable version of node.js using nvm install --lts command as shown below.
cyberithub@ubuntu:~$ nvm install --lts Installing latest LTS version. Downloading and installing node v24.21.0... Downloading https://nodejs.org/dist/v24.21.0/node-v24.21.0-linux-x64.tar.xz... ############################################################################################################ 100 Computing checksum with sha256sum Checksums matched! Now using node v24.21.0 (npm v11.19.0) Creating default alias: default -> lts/* (-> v24.21.0 *)
b) Install Absolute Latest Version
If you are looking to install the absolute latest version with all the latest features available then run nvm install node command as shown below.
cyberithub@ubuntu:~$ nvm install node Downloading and installing node v26.10.0... Downloading https://nodejs.org/dist/v26.10.0/node-v26.10.0-linux-x64.tar.xz... ######################################################################################################### 100.0% Computing checksum with sha256sum Checksums matched! Now using node v26.10.0 (npm v11.19.1)
Step 6: Check Node.js version
You can now check the installed node.js version by using node --version command as shown below.
Latest Stable Version
cyberithub@ubuntu:~$ node --version v24.21.0
Absolute Latest Version
cyberithub@ubuntu:~$ node --version v26.10.0