DEV Community

Cover image for Install Node.js on Ubuntu 20.04
SittingDev
SittingDev

Posted on • Originally published at sittingdev.com

4 2

Install Node.js on Ubuntu 20.04

Learn how to install Node.js and NPM on Ubuntu 20.04 LTS with this quick tutorial.

Find the latest version of Node.js through the apt repository.

sudo apt-cache show nodejs

The apt repository version is often outdated compared to the latest long-term support version available on the Node.js website. So we will install it from there instead.

Go to the Node.js website - https://nodejs.org/en/.

Click on the 'other downloads' link and navigate to 'install node.js via package manager'.

Go to this URL - https://github.com/nodesource/distributions/blob/master/README.md.

Scroll down until you find the LTS version of Node.js and proceed to the next step.

To install Node.js you will need to make sure you have curl installed.

curl --version

If you need to install curl -

sudo apt install curl

Now go back to the github page we opened and proceed to follow the instructions.

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

Once this has run, you will want to check the version to confirm that node has installed as it should.

node --version

You can also check the NPM version as it was installed with Node in this case.

npm --version

Image of Stellar post

How a Hackathon Win Led to My Startup Getting Funded

In this episode, you'll see:

  • The hackathon wins that sparked the journey.
  • The moment José and Joseph decided to go all-in.
  • Building a working prototype on Stellar.
  • Using the PassKeys feature of Soroban.
  • Getting funded via the Stellar Community Fund.

Watch the video

Top comments (0)

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay