1、查看~/.bash_profile目錄文件是否存在
cd ~/
顯示這個(gè)目錄下的所有文件,(包含隱藏文件)
ls -a
查看.bash_profile文件是否存在,
如果沒(méi)有,新建一個(gè):
touch ~/.bash_profile
2.安裝
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
3.執(zhí)行命令打開(kāi)文件
open .zshrc
最下面添加如下
source ~/.bash_profile
4.使用nvm
nvm version