

You can verify that you have successfully installed Node.js on Ubuntu by querying it for its version. Run the following command to install the software using the “ apt” package manager. After the package update completes, we can finally install Node.js to our Ubuntu system. Update your systems package cache using the following command on your Ubuntu systems terminal. Updating ensures we should only contain live links so “apt” won’t attempt to download NodeJS from an offline mirror. Secondly, the cache contains links to where these packages exist.First, the package list cache will be updated, ensuring we are grabbing the latest release.Updating the package list ensures two things for the system. We will need to update the package list before we can install Node.JS from the default Ubuntu package repositories. If you require a version of Node.js that is kept up to date, please go to “ Installing from the Official Node.js Repository on Ubuntu” or “ Installing Node.js to Ubuntu using NVM“.ġ. But Ubuntu 22.04 contains the newer, but also unsupported, 12.22 release.

The older release of Ubuntu that you are using, the older version of the runtime will be installed.įor example, Ubuntu 20.04 has the no longer supported 10.19 version of Node.js in it’s repository. This method means you will be stuck with the version of Node.js provided with your release of Ubuntu. Installing Node.js from the Ubuntu Package Repositoryįor this first method, we will be installing Node.js to Ubuntu straight from the default package repository.


These steps will work on all LTS releases of Ubuntu. This guide will teach you how to install the Node.js runtime on your Ubuntu system. This runtime is often used for server-side programming, allowing you to write a scalable and fast web backend in a reasonably well-known language. Node.js is an open-source runtime that allows you to execute JavaScript locally without needing a web browser. This tutorial will teach you how to install the Node.js runtime on the Ubuntu operating system.
