GNU/Linux Ubuntu Adding Node JS Repository
The Guide shows you Step-by-step How to Add the Node JS Repository for Ubuntu-Based GNU/Linux Systems.
And with this Node JS Repo Setup you’ll be able to Install the latest node.js Releases, included: 20.x LTS, 22.x LTS, and Current.
For more insight see the official: NodeJs Repository Documentation.
Finally, this Node JS Ubuntu Repository is valid also for:
- Linux Mint
- Zorin OS
- Lubuntu
- Elementary OS
- Kde Neon
- Pop_OS!
- Xubuntu
- Linux Lite
- Bodhi
- Puppy
- Kubuntu
- LXLE
- Trisquel
- Voyager
- feren OS
- Peppermint
- Linux Ultimate Edition
(You may only need to find the Corresponding Ubuntu Parent Release)

-
1. Terminal Getting Started Guide
How to QuickStart with Command Line on Ubuntu GNU/Linux
First Update the Apt Repo Sources with:
sudo apt update
Authenticate with the User Admin Pass.
If Got “User is Not in Sudoers file” then see: How to Enable sudo. -
2. Installing Dependencies
Then to Install Required Software
Run:sudo apt install -y ca-certificates curl gnupg
-
2. Adding GPG Key
Now to Add Node.js Signing Key
First, make the Target Directory with:sudo mkdir -p /etc/apt/keyrings
And then to Setup it:
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
-
3. Setting Up NodeJS Repository
Then Add Node JS Apt Repository
Especially relevant: Node.js 18+ is supported only on Ubuntu 20.04+ based Systems.
Now for Node 23.x run:curl -fsSL https://deb.nodesource.com/setup_23.x | sudo -E bash -
Again for 22 LTS run:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
So for 20 LTS run:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
Last, to Update the Apt Sources:
sudo apt update
Finally, due to the quick NodeJs development cycle sometimes the latest Releases may be missing from this list, in case consult: Node.js Repo on Github.
-
4. Installing NodeJS
Now to Install NodeJS for Linux
Simply play:sudo apt install nodejs
-
5. Getting Started Node Js
How to Get Started with NodeJs on Ubuntu GNU/Linux