install nvm
1 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash |
or
1 | wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash |
设置环境变量
1 | export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" |