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

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
🌐
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. If you're using macOS or Windows, use one of the installers from the Node.js download page.
🌐
LinuxConfig
linuxconfig.org › home › install npm on linux
Install npm on Linux: A Complete Guide
September 22, 2025 - npm is the package manager for Node.js and the JavaScript coding language. It can be installed on a Linux system and then used on the command line to download and install JavaScript packages and their requisite dependencies.
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
Download nodejs rpm into cut off Linux machine

On an ubi container, but it should work on any RHEL installation too, I was able to do something like:

mkdir ~/rpms
cd ~/rpms
dnf module enable nodejs:18
dnf download --resolve nodejs

That gave me the nodejs 18.18.2 rpm and a few others that it depends on.

You should then be able to upload those rpms in another instance and install them.

More on reddit.com
🌐 r/redhat
19
1
July 28, 2022
🌐
npm
npmjs.com › package › npm
npm - npm
2 weeks ago - npm comes bundled with node, & most third-party distributions, by default. Officially supported downloads/distributions can be found at: nodejs.org/en/download
      » npm install npm
    
Published   Nov 25, 2025
Version   11.6.4
Author   GitHub Inc.
🌐
GeeksforGeeks
geeksforgeeks.org › node.js › installation-of-node-js-on-linux
How to Install Node.js on Linux - GeeksforGeeks
July 12, 2025 - The installation steps may vary ... major Linux distros. Access to the Command Line: You will need terminal access with root or sudo privileges to install software and packages. Updated System: It’s essential that your system’s package list is up-to-date. Internet Connection: An active internet connection is required to download Node.js and npm ...
🌐
GitHub
gist.github.com › thejmazz › 72456e3f29cf0bf56d4a
Install Node and npm on Linux/OS X/Windows w/o sudo · GitHub
TLDR; Download install-node.sh, modify the settings, make it executable (chmod u+x install-node.sh), and run it (./install-node.sh). Unless your on Windows, then you need to follow the full instructions.
Find elsewhere
🌐
Node.js
nodejs.org › en › download
Node.js — Download Node.js®
Looking for Node.js source? Download a signed Node.js source tarball.
🌐
Cypress
docs.cypress.io › app › get-started › install-cypress
Install using npm, Yarn, or pnpm | Cypress Documentation | Cypress Documentation
1 week ago - Linux (x64 or arm64) see also Linux Prerequisites down below ... Windows 11 24H2 (arm64, runs in x64 emulation mode, minimum Cypress 14.5.0 required) - preview status ... Follow the instructions on Download Node.js to download and install Node.js.
🌐
Ramotion
ramotion.com › blog › how-to-install-npm
A Step-by-Step Guide to Install NPM for Beginners | Ramotion Agency
July 10, 2025 - Complete fuide how to install NPM is here. Learn to install npm, the Node Package Manager, on Windows, macOS, and Linux.
🌐
Linode
linode.com › docs › guides › install-and-use-npm-on-linux
Install and Use the Node Package Manager (NPM) on Linux | Linode Docs
September 3, 2021 - This guide will show you how to install and use the Node Package Manager (NPM), which gives you access to a vast Node.js repository, on Linux.
🌐
GeeksforGeeks
geeksforgeeks.org › node.js › how-to-download-and-install-node-js-and-npm
How to Download and Install Node.js and NPM - GeeksforGeeks
July 23, 2025 - Click on the version you wish to download. The website will automatically detect your operating system and recommend the appropriate version (Windows, macOS, or Linux).
🌐
Treehouse Blog
blog.teamtreehouse.com › installing-node-js-and-npm-on-linux
How to Install Node.js and NPM on Linux [Guide] | Treehouse Blog
September 11, 2023 - Installing Node.js and NPM is pretty straightforward using Linuxbrew, the Linux port of Homebrew. It handles downloading, unpacking, compiling, and installing Node and NPM on your system.
🌐
MonoVM
monovm.com › 📚 tutorials 📚 › how to install npm on ubuntu: a step-by-step guide
How to Install npm on Ubuntu: A Step-by-Step Guide
October 4, 2025 - In this guide, we’ll cover what npm is, why you need it, and multiple methods to install npm Ubuntu (including Ubuntu 22.04, 20.04, and older versions).
🌐
PhoenixNAP
phoenixnap.com › home › kb › devops and development › how to install node.js and npm on ubuntu
How to Install Node.js and NPM on Ubuntu
April 24, 2025 - Learn how to install Node.js and NPM on Ubuntu. This guide explains three methods: Ubuntu repository, NVM, and NodeSource repository.
🌐
Webhi
webhi.com › home › how to install npm on debian/ubuntu or centos/rhel
How to Install NPM on Debian/Ubuntu or CentOS/RHEL - Tutorial & Documentation
February 9, 2024 - Learn how to install NPM (Node Package Manager) on Debian/Ubuntu and CentOS/RHEL Linux systems. Step-by-step guide to checking existing installations, removing old versions, and various installation methods using default repos, NodeSource, nvm, and more.
🌐
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 - While this tutorial will be using Ubuntu’s apt and Arch Linux’s pacman, the process should be similar for most distributions. See here for more information about installing NodeJS and NPM via your package manager.
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › beginner questions
I'm trying to install nodejs with npm. - Linux Mint Forums
April 10, 2023 - I am trying to install nodejs with npm, but when I try to do it I get this error. I'm very new to linux and I've been trying to install postgres for a few days but it didn't work very well, thank you very much for your help.
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to install node.js and npm on centos and rocky linux
How to Install Node.js and NPM on CentOS and Rocky Linux
December 25, 2024 - A CentOS or Rocky Linux system. Access to the terminal. ... An account with sudo or root privileges. The simplest way to install Node.js and npm is from the NodeSource repository, which provides up-to-date versions tailored for your system.