Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu使用nvm管理多版本node.js #12

Open
chenshenhai opened this issue Aug 31, 2016 · 0 comments
Open

ubuntu使用nvm管理多版本node.js #12

chenshenhai opened this issue Aug 31, 2016 · 0 comments
Labels

Comments

@chenshenhai
Copy link
Owner

chenshenhai commented Aug 31, 2016

ubuntu使用nvm管理多版本node.js

安装git

sudo apt-get install git

安装vim

sudo apt-get install vim-gtk

安装配置nvm

下载安装nvm

https://github.com/creationix/nvm

配置环境变量

# 回到用户根目录
cd 

# 打开配置文件
vim .bashrc

# 在配置文件最后加上
source ~/.nvm/nvm.sh  

#保存配置文件
source .bashrc

# 检查是否安装成功
nvm --h

利用nvm安装管理各版本node.js

# 查看远程所有node.js版本
nvm ls-remote

# 安装4.4.7和6.5.0版本
nvm install 4.4.7
nvm install 6.5.0

# 切换版本
nvm use 4.4.7

# 查看当前版本和已下载版本
nvm ls 

# 设置默认版本
nvm alias default v6.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant