Installing Nodejs on Linux

0. Foreword

Nodejs

1. Download Nodejs Installation Package

1
2
cd /usr/local
wget https://nodejs.org/dist/v16.15.1/node-v16.15.1-linux-x64.tar.xz

2. Decompress

1
2
tar -xvf node-v16.15.1-linux-x64.tar.xz
mv node-v16.15.1-linux-x64 nodejs

3. Soft Connection

1
2
ln -s /usr/local/nodejs/bin/node /usr/bin/node
ln -s /usr/local/nodejs/bin/npm /usr/bin/npm

4. Verification

1
node --version

Installing Nodejs on Linux
https://www.hardyhu.cn/2023/02/02/Installing-Nodejs-on-Linux/
Author
John Doe
Posted on
February 2, 2023
Licensed under