linux command to update nodejs 1

linux command to update nodejs

wget https://nodejs.org/dist/v12.13.1/node-v12.13.1-linux-x64.tar.xz

Here is what the above code is Doing:
1. We’re using the wget command to download the Node.js binary archive.
2. We’re using the tar command to extract the contents of the archive.
3. We’re using the mv command to move the extracted folder to /usr/local/lib/nodejs.
4. We’re using the ln command to create a symbolic link from /usr/local/lib/nodejs/bin/node to /usr/local/bin/node.
5. We’re using the ln command to create a symbolic link from /usr/local/lib/nodejs/bin/npm to /usr/local/bin/npm.

Similar Posts