Ubuntu18.04 installation nodejs

Ubuntu18.04 installation nodejs

 1. Download and install node.js

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

2. After the download is complete the next move to / usr / local unzipped

Because of the downloaded file is .tar.xz file, which is compressed layers, the outer layer is xz compression method, there is a layer of tar compression

sudo xz -d filename.tar.xz

sudo tar -xvf filename.tar

3. Establish a link to the  /usr/local/bin/ directory

sudo ln -s /usr/local/nodejs/bin/node /usr/local/bin/node

sudo ln -s /usr/local/nodejs/bin/npm /usr/local/bin/npm


4. Environment set up is completed

Published 78 original articles · won praise 72 · views 70000 +

Guess you like

Origin blog.csdn.net/weixin_43713498/article/details/104995454