Home  >  Article  >  Web Front-end  >  How to install nodejs using linux command

How to install nodejs using linux command

藏色散人
藏色散人Original
2021-09-14 14:44:384070browse

How to install nodejs with linux command: 1. Select a suitable nodejs version to download; 2. Upload the installation package to Just specify the location.

How to install nodejs using linux command

The operating environment of this article: linux5.9.8 system, nodejs version 10.6, Dell G3 computer.

How to install nodejs using linux command?

Installing Nodejs on Linux system

1. Download the installation file

1. Download address: http://nodejs.cn/download/

2. Choose a suitable version to download

2. Installation steps

1. Upload the installation package to the specified location (I am used to putting it in: /usr/local/application/directory) and unzip it


 tar -xvf node-v10.6.0-linux-x64.tar.xz

2. Rename the folder


 mv node-v10.6.0-linux-x64 nodejs

3. Make it global by establishing a soft connection


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

4. Check whether the installation is successful, command: node-v


 node -v2 v10.6.0

The above is the detailed content of How to install nodejs using linux command. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn