I really recommend you install node and npm using nvm. This is the fastest, cleanest and easiest way to do it.

That way, you install NVM simply doing:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash

To test that nvm was properly installed, close and re-open Terminal and enter nvm. If you get a nvm: command not found message, your OS may not have the necessary .bash_profile file. In Terminal, enter touch ~/.bash_profile and run the above install script again.

And you are now able to install node typing:

nvm install <version>

For example

nvm install 4.2.1

if you just want to install the latest node version, you can just type

nvm install node

In order to access node and npm as sudo (in order to have <1024 ports) you should run

n=$(which node)
n=${n%/bin/node}
chmod -R 755 $n/bin/* 
sudo cp -r $n/{bin,lib,share} /usr/local 
Answer from Luis González on Stack Overflow
🌐
Node.js
nodejs.org › en › download
Node.js — Download Node.js®
Learn more about Node.js releases, including the release schedule and LTS status. Learn how to verify signed SHASUMS. Looking for Node.js source? Download a signed Node.js source tarball. Check out our nightly binaries or all previous releases or the unofficial binaries for other platforms. We are able to serve Node.js's downloads and maintain our infrastructure proudly due to the support of these partners, and more.
Discussions

Linux: Best way to install node & npm
my preferred options. firstly, do not install from apt, it gets too old of versions instead, go to https://github.com/nodesource/distributions#debian-and-ubuntu-based-distributions which gives you a new apt repository, and then you can install from apt or, just use nvm ( https://github.com/nvm-sh/nvm ) or fnm ( https://github.com/Schniz/fnm ). fnm is nice because it does not lag shell startup as much as nvm. these latter two options may be better for dev than production, just since it is mostly installed to your local environment More on reddit.com
🌐 r/node
13
1
December 8, 2022
How do I install Node.js????
You could via this repository: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions More on reddit.com
🌐 r/linuxmint
9
1
February 2, 2018
How to Install Node.js on Ubuntu 22.04 LTS | Configure Node.js and NPM |...
You should probably put in your title the reason why you needed to make this video. The official installation instructions are here: https://nodejs.org/en/download/package-manager#debian-and-ubuntu-based-linux-distributions More on reddit.com
🌐 r/node
2
0
April 18, 2023
How to install latest NodeJS (18) and NPM on LMDE5?
sudo apt install npm nodejs sudo npm install -g n sudo n install latest sudo npm install -g npm npm --version > 8.7.0 node --version > v18.0.0 (I've done deployments on Debian and Ubuntu servers for Node software. I've got this all written down. You just need to use the official packaged versions to bootstrap npm.) More on reddit.com
🌐 r/linuxmint
15
3
February 22, 2022
🌐
GeeksforGeeks
geeksforgeeks.org › node.js › installation-of-node-js-on-linux
How to Install Node.js on Linux - GeeksforGeeks
July 12, 2025 - Plus, with scalable plans, you have full control to customize your server setup, making it perfect for developers at any stage. For most Linux distributions, the easiest way to install Node.js is through the default package manager.
🌐
Node.js
nodejs.org › en › download › package-manager › all
Node.js — Installing Node.js via package manager
October 15, 2025 - Void Linux ships Node.js stable in the main repository. ... Download the Windows Installer directly from the nodejs.org web site.
🌐
npm
docs.npmjs.com › downloading-and-installing-node-js-and-npm
Downloading and installing Node.js and npm | npm Docs
If you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system. ... If you use Linux, we recommend that you use a NodeSource installer.
🌐
Microsoft Learn
learn.microsoft.com › en-us › windows › dev-environment › javascript › nodejs-on-wsl
Install Node.js on Windows Subsystem for Linux (WSL2)
For those who prefer using Node.js in a Linux environment, this guide will help you to install Node.js on the Windows Subsystem for Linux (WSL 2 is the recommended version).
Find elsewhere
🌐
Treehouse
treehouse.github.io › installation-guides › linux › node-linux.html
Installing Node.js® and NPM on Linux
The whole process (after you have Linuxbrew installed) should only take you a few minutes. Open up your terminal and type brew install node. Sit back and wait. Homebrew has to download some files, compile and install them. But that’s it. Make sure you have Node and NPM installed by running ...
🌐
GitHub
github.com › nvm-sh › nvm
GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
If you're running a system without prepackaged binary available, which means you're going to install node or io.js from its source code, you need to make sure your system has a C++ compiler. For OS X, Xcode will work, for Debian/Ubuntu based GNU/Linux, the build-essential and libssl-dev packages work. Note: nvm also supports Windows in some cases.
Starred by 90.3K users
Forked by 9.7K users
Languages   Shell 98.0% | Makefile 1.2%
🌐
Snapcraft
snapcraft.io › node
Install Node.js Runtime on Linux | Snap Store
October 30, 2025 - Make sure snap support is enabled in your Desktop store. ... Don't have snapd? Get set up for snaps. A JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
🌐
JumpCloud
jumpcloud.com › home › blog › how to install node.js 20 on rocky linux 9 or rhel 9
How to Install Node.js 20 on Rocky Linux 9 or RHEL 9 - JumpCloud
In this step-by-step tutorial, we demonstrated how to install Node.js 20 on Rocky Linux 9 or RHEL 9. We also went a step further and showed you how to install various versions of Node, and how to manage them.
Published   March 19, 2024
🌐
AWS
docs.aws.amazon.com › javascript sdk › developer guide for sdk v2 › tutorials › tutorial: setting up node.js on an amazon ec2 instance
Tutorial: Setting Up Node.js on an Amazon EC2 Instance - AWS SDK for JavaScript
A common scenario for using Node.js with the SDK for JavaScript is to set up and run a Node.js web application on an Amazon Elastic Compute Cloud (Amazon EC2) instance. In this tutorial, you will create a Linux instance, connect to it using SSH, and then install Node.js to run on that instance.
🌐
Linux.org
linux.org › home › forums › general linux forums › ask tuxbot (archived)
help installing nodejs | Linux.org
February 15, 2024 - Sometimes I get caught up in the waves of information. Alright, let's get into it. First things first, installing Node.js and npm using tarballs can be a bit tricky. It's recommended to use a package manager instead, like apt, yum, or pacman, depending on your Linux distro.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-node-js-on-ubuntu-20-04
How to Install Node.js on Ubuntu | DigitalOcean
May 2, 2025 - Learn how to install Node.js on Ubuntu using apt, NodeSource, and NVM. Choose the best method for your needs with this beginner-friendly guide
🌐
Visual Studio Code
code.visualstudio.com › docs › nodejs › nodejs-tutorial
Node.js tutorial in Visual Studio Code
November 3, 2021 - See Installing Node.js via package manager to find the Node.js package and installation instructions tailored to your version of Linux.
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › software & applications
How do I install the latest version of nodejs? - Linux Mint Forums
October 7, 2021 - Thanks Colin (I am running linux mint 19.3 cinnamon) Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total. Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed. ... The installation instructions are here: https://github.com/nodejs/help/wiki/Installation.
🌐
CyberPanel
cyberpanel.net › blog › installing-node-js-on-linux
Installing Node.js on Linux: Step-by-Step Guide
June 2, 2025 - Learn installing Node.js on Linux using APT, YUM, NVM, or NodeSource. Step-by-step guide for Linux, Amazon Linux, Kali, and more.
🌐
London App Developer
londonappdeveloper.com › home › tutorials › how to install node.js v6 on linux
How to install Node.JS v6 on Linux - London App Developer
September 19, 2017 - This video is a step-by-step instruction of installing Node.JS version 6 on Ubuntu or Linux Mint. Hint: As tempting as it might be, don’t install it through the package manager. I’ll explain why in the video below. Node.JS Official Website: https://nodejs.org/en/
🌐
Liquid Web
liquidweb.com › home › how to install node.js on linux (almalinux)
How to install Node.js on Linux (AlmaLinux) | Liquid Web
April 4, 2025 - Node.js is a robust runtime environment for running JavaScript on your web server, making it a popular choice for developing scalable and high-performance applications. Node.js was not available in the AlmaLinux official repositories. However, you may still install Node.js using the NodeSource repository with up-to-date Node.js packages.