「Fnm」:修訂間差異
跳至導覽
跳至搜尋
無編輯摘要 |
|||
第7行: | 第7行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cd /tmp; wget https://github.com/Schniz/fnm/releases/download/v1.35.0/fnm-linux.zip; mkdir ~/.fnm; unzip fnm-linux.zip -d ~/.fnm/; chmod 755 ~/.fnm/fnm; echo '[ -s "${HOME}/.fnm/fnm" ] && eval "$(${HOME}/.fnm/fnm env)" && export PATH="${HOME}/.fnm:${PATH}"' >> ~/.profile | cd /tmp; wget https://github.com/Schniz/fnm/releases/download/v1.35.0/fnm-linux.zip; mkdir ~/.fnm; unzip fnm-linux.zip -d ~/.fnm/; chmod 755 ~/.fnm/fnm; echo '[ -s "${HOME}/.fnm/fnm" ] && eval "$(${HOME}/.fnm/fnm env --use-on-cd)" && export PATH="${HOME}/.fnm:${PATH}"' >> ~/.profile | ||
</syntaxhighlight> | </syntaxhighlight> | ||
於 2023年7月31日 (一) 04:46 的修訂
fnm是一套Node.js的版本管理工具,以速度為主要賣點。
安裝
這邊可以去GitHub上面確認最新版的binary:
cd /tmp; wget https://github.com/Schniz/fnm/releases/download/v1.35.0/fnm-linux.zip; mkdir ~/.fnm; unzip fnm-linux.zip -d ~/.fnm/; chmod 755 ~/.fnm/fnm; echo '[ -s "${HOME}/.fnm/fnm" ] && eval "$(${HOME}/.fnm/fnm env --use-on-cd)" && export PATH="${HOME}/.fnm:${PATH}"' >> ~/.profile
使用
像是這樣:
fnm install 18
fnm ls
fnm default 18