Skip to content

Instantly share code, notes, and snippets.

@hamidrhashmi
Last active December 27, 2023 14:25
Show Gist options
  • Save hamidrhashmi/f887eb21b5f82edcec2ac60d37d167ff to your computer and use it in GitHub Desktop.
Save hamidrhashmi/f887eb21b5f82edcec2ac60d37d167ff to your computer and use it in GitHub Desktop.
How to Install Node

Download the package

wget https://nodejs.org/dist/v21.5.0/node-v21.5.0-linux-x64.tar.xz

untar the files

tar -xvf node-v21.5.0-linux-x64.tar.xz

move it to /usr/local/

mv node-v21.5.0-linux-x64 /usr/local/node

make soft links to

ln -s /usr/local/node/bin/node /usr/bin/node
ln -s /usr/local/node/bin/npm /usr/bin/npm
ln -s /usr/local/node/bin/npx /usr/bin/npx

Check node version

node -v
v21.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment