Intro

In this post I will show you how to install Node JS and the Yarn package manager on Ubuntu 2004 server.

Software Used

  • Ubuntu - 2004 server
  • Node JS - v16.7.0
  • Yarn - 22.11

Install Node JS

I am installing Node from the node source's distribution.

Run the Node JS setup script from the Node Source repository.

cmd
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -

Install Node JS.

cmd
sudo apt install -y nodejs

Verify the version of Node that is installed.

cmd
node --version

# output
 
v16.7.0

Verify the version of NPM that is installed.

cmd
npm --version

# output
 
7.20.3

Install Yarn

cmd
sudo npm install --global yarn

Confirm the version of Yarn that is installed.

cmd
yarn --version

# output
 
1.22.11

Outro

In this post, we installed Node JS and the Yarn package manager.

# node
# yarn
# ubuntu