Image by (hiteshchoudharyofficial)

Only two steps are involved.

Step 1

Open a terminal and update the repository list:

sudo apt update 

This command will prompt to type y for yes.

Step 2

Enter the command to install Nodejs. This command will prompt you to type y for yes.

sudo apt install nodejs

When done type:

node --version

Should show something like:

node --version command


Package manager

They are two package managers you can you. npm or yarn.

Try not to use them interchangeably as they may cause errors in your projects.

Npm comes installed with nodejs as yarn has to be installed separately.

npm install yarn --global

When done type:

yarn --version

Should show something like:

yarn --version command output

Fun fact using npm to install yarn is using a package manager to install a packager manager.

You are all set. Happy Coding🎉

For more follow me on Twitter



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store