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
🌐
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.
People also ask

What are the various ways to install Node.js on Linux?
You can install Node.js on Linux using the following methods:

Using a package manager (APT for Ubuntu/Debian, DNF/YUM for RHEL-based distros, Pacman for Arch)
Using Node Version Manager (NVM) – Best for managing multiple versions
Installing from NodeSource – Provides the latest version of Node.js
Downloading precompiled binaries from the official Node.js website
Building from source – Suitable for advanced users who need a custom build
🌐
cyberpanel.net
cyberpanel.net › blog › installing-node-js-on-linux
Installing Node.js on Linux: Step-by-Step Guide
What is Node.js, and why do I need it for Linux?
Node.js is a JavaScript runtime that lets you run JavaScript outside of the browser, mainly for server-side programming. It is used quite extensively for creating web applications, APIs, real-time apps, and microservices. installing Node.js on Linux enables developers to run and deploy JavaScript applications within a server environment efficiently.
🌐
cyberpanel.net
cyberpanel.net › blog › installing-node-js-on-linux
Installing Node.js on Linux: Step-by-Step Guide
Can I install Node.js without root/sudo access?
Yes, by using NVM, you can install and manage Node.js in your user directory without requiring root access.
🌐
cyberpanel.net
cyberpanel.net › blog › installing-node-js-on-linux
Installing Node.js on Linux: Step-by-Step Guide
🌐
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.
🌐
Node.js
nodejs.org › en › download › package-manager › all
Node.js — Installing Node.js via package manager
Void Linux ships Node.js stable in the main repository. ... Download the Windows Installer directly from the nodejs.org web site.
🌐
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.
🌐
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.
Find elsewhere
🌐
UpStack
upstackhq.com › upstack blog › software development
How To Install Node.JS On Linux (6 Minute Read) | Upstack
The Arch Linux community repository contains both the Node.js and Node Package Manager (npm) packages. You can install both using this command: ... If you want to install Node.js on CentOS/RHEL 8 and Fedora, the package is available as a module. You will also need to specify the stream parameter in the command that corresponds to the version you require.
🌐
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
🌐
DEV Community
dev.to › chand1012 › how-to-install-node-on-linux-the-easy-way-3hm8
How to Install Node on Linux the Easy Way. - DEV Community
January 28, 2021 - First, install whatever versions of NodeJS and NPM are available in your distro’s package manager. For example, this is how you would install on Ubuntu 20.04. ... This would be the command for Arch Linux.
🌐
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.
🌐
Rheinwerk Computing
blog.rheinwerk-computing.com › how-to-install-node.js-on-windows-mac-and-linux-systems
How to Install Node.js on Windows, Mac, and Linux Systems
April 24, 2025 - ... This shows you how to download the Node.js Linux binaries package without a graphical user interface (GUI). To do this, you use the wget command-line tool. It downloads the package from the web server http://nodejs.org.
🌐
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.
🌐
Kinsta®
kinsta.com › home › resource center › blog › node.js › how to install node.js and npm on windows, macos, and linux
How to install Node.js and npm on Windows, macOS, and Linux
May 31, 2024 - You need to copy and paste the Node.js installation command into your terminal (in our case, we can grab it from the Ubuntu distribution page) so that the system can begin the Node.js installation.
🌐
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 ...
🌐
OSTechNix
ostechnix.com › home › programming › nodejs › how to install nodejs on linux
How To Install NodeJS On Linux - OSTechNix
March 4, 2025 - Like I already said, nodejs is available in the default repositories, but it might be bit outdated. To install the most recent version, install the latest version from NodeSource. Add the latest Nodejs repository as shown here depending on the Linux distribution you use.
🌐
Veeble
veeble.com › home › installation › how to install node.js on linux
How to Install Node.js on Linux - Veeble Hosting
March 12, 2025 - Learn how to install Node.js on Linux via different methods including node source binary distribution, default repo & nvm.
🌐
Cybrosys Technologies
cybrosys.com › odoo blogs
How to Install Node.js on Windows & Linux
In this blog post, we'll delve into what Node.js is, how to install it, and explore some of its basic use cases.
🌐
freeCodeCamp
freecodecamp.org › news › how-to-install-node-js-on-ubuntu
How to Install Node.js on Ubuntu – Node Linux Installation Guide
October 20, 2023 - Today, I am going to show you how you can install the latest LTS version of Node on your Ubuntu operating system. This processes will work on any kind of Debian-based Linux operating system (Ubuntu, Mint, Zorin, Debian, Elementary OS, and so on). It'll work whether you are using that as your main operating system, secondary operating system on dual boot, WSL on Windows, or using in a virtual machine (VMware Workstation, VirtualBox, and so on).