Install Node.js 19 on Ubuntu 22.04

This article will go through how to install Node js 19 on Ubuntu 22.04. Node js 19 just got released though it’s not LTS(Long term support) you can play with it on your local environment so as to test its new features.

How to Install Node.js 19 on Ubuntu 22.04

  • Update your system packages using the command below.
sudo apt update
  • Next, install curl using the command below in case it’s missing on your system.
sudo apt install -y curl
  • Then run the command below to get Node.js 19 PPA repository.
curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash -
  • After that install Node js using the following command.
sudo apt install -y nodejs

Sample output

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 151 not upgraded.
Need to get 29.3 MB of archives.
After this operation, 184 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_19.x jammy/main amd64 nodejs amd64 19.1.0-deb-1nodesource1 [29.3 MB]
Fetched 29.3 MB in 4min 18s (113 kB/s)                           
Selecting previously unselected package nodejs.
(Reading database ... 202931 files and directories currently insta
lled.)
Preparing to unpack .../nodejs_19.1.0-deb-1nodesource1_amd64.deb .
..
Unpacking nodejs (19.1.0-deb-1nodesource1) ...
Setting up nodejs (19.1.0-deb-1nodesource1) ...
Processing triggers for man-db (2.10.2-1) ...
  • To confirm the version installed using the command below.
node --version
  • Update your system and install the yarn package manager after Node js installation.
sudo apt update && sudo apt install yarn

Sample output

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'cmdtest' instead of 'yarn'
The following additional packages will be installed:
  python3-cliapp python3-markdown python3-pygments
  python3-ttystatus
Suggested packages:
  python-markdown-doc python-pygments-doc ttf-bitstream-vera
The following NEW packages will be installed:
  cmdtest python3-cliapp python3-markdown python3-pygments
  python3-ttystatus
0 upgraded, 5 newly installed, 0 to remove and 151 not upgraded.
Need to get 899 kB of archives.
After this operation, 4,875 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 python3-cliapp all 1.20180812.1-4 [44.5 kB]
Get:2 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 python3-markdown all 3.3.6-1 [68.5 kB]
Get:3 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 python3-ttystatus all 0.38-4 [14.7 kB]
Get:4 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 cmdtest all 0.32.14.gcdfe14e-2 [21.9 kB]
Get:5 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 python3-pygments all 2.11.2+dfsg-2 [750 kB]
Fetched 899 kB in 57s (15.7 kB/s)                                
Selecting previously unselected package python3-cliapp.
(Reading database ... 207996 files and directories currently installed.)
Preparing to unpack .../python3-cliapp_1.20180812.1-4_all.deb ...
Unpacking python3-cliapp (1.20180812.1-4) ...
Selecting previously unselected package python3-markdown.
Preparing to unpack .../python3-markdown_3.3.6-1_all.deb ...
Unpacking python3-markdown (3.3.6-1) ...
Selecting previously unselected package python3-ttystatus.
Preparing to unpack .../python3-ttystatus_0.38-4_all.deb ...
Unpacking python3-ttystatus (0.38-4) ...
Selecting previously unselected package cmdtest.
Preparing to unpack .../cmdtest_0.32.14.gcdfe14e-2_all.deb ...
Unpacking cmdtest (0.32.14.gcdfe14e-2) ...
Selecting previously unselected package python3-pygments.
Preparing to unpack .../python3-pygments_2.11.2+dfsg-2_all.deb ...
Unpacking python3-pygments (2.11.2+dfsg-2) ...
Setting up python3-ttystatus (0.38-4) ...
Setting up python3-cliapp (1.20180812.1-4) ...
Setting up python3-pygments (2.11.2+dfsg-2) ...
Setting up python3-markdown (3.3.6-1) ...
Setting up cmdtest (0.32.14.gcdfe14e-2) ...
Processing triggers for man-db (2.10.2-1) ...
  • That marks the end of our article, we have gone through how to install Node.js 19 on Ubuntu 22.04.

Read more on Node js Docs

Other Tutorials

Install Elixir on Ubuntu 22.04

Install Phoenix Framework on Ubuntu 22.04

Install Fedora 37 on VirtualBox

System administrator | Software Developer | DevOps

Leave a Comment