Install NodeJS on Linux (manually)

Vibhanshu Biswas
1 min readOct 7, 2021

--

Image Courtesy: Wikipedia

If you are unable to install NodeJS the traditional way by a package manager then you can follow the below steps which include some very easy to follow steps.

1. Download the LTS version of NodeJS as tar ball (.tar.xz) from the downloads page of Official NodeJS website.

https://nodejs.org/en/download/

2. Extract the files

$ sudo tar -xvf node-vx.x.x-linux-x64.tar.xz

3. cd in to the extracted directory and copy the ‘bin’ folder contents into /usr/bin

$ sudo cp -r bin/* /usr/bin

4. cd in to the extracted directory and copy the ‘lib’ folder contents into /usr/lib

$ sudo cp -r lib/* /usr/lib

Now you can test the binaries with the following commands

$ node -v
$ npm -v
$ npx -v

This should respond you with the installed version information of the binaries.

As always open to any corrections or changes. Or a friendly discussion. :)

Tested on Ubuntu — basically I have copied all the necessary files in the directories which are already in the PATH variable.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Vibhanshu Biswas
Vibhanshu Biswas

Written by Vibhanshu Biswas

I like clean git branches, I love music and I love my servers specially the micro ones ❤

No responses yet

Write a response