> For the complete documentation index, see [llms.txt](https://kawsing.gitbook.io/opensystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled-4/an-zhuang-nodejs-huan-jing.md).

# 安裝nodejs環境

## Linux 上安裝Node.js

### 一行指令安裝

```
curl -sL https://deb.nodesource.com/setup_12.x | bash -
```

### 直接使用已編譯好的包

Node 官網已經把linux 下載版本更改為已編譯好的版本了，我們可以直接下載解壓後使用：

![](/files/-LsPFtWGxhhWW5K49qA3)

wget <https://nodejs.org/dist/v12.13.0/node-v12.13.0-linux-x64.tar.xz>

```
tar xvf node-v12.13.0-linux-x64.tar.xz
cd node-v12.13.0-linux-x64/
ln -s /root/node-v12.13.0-linux-x64/bin/node /usr/local/bin/
ln -s /root/node-v12.13.0-linux-x64/bin/npm /usr/local/bin/
```

#### node -v

#### npm -v
