linux 安装 nvm

本文介绍了如何在不同的系统环境下通过curl、wget和git命令安装Node Version Manager (nvm)。首先,展示了使用curl和wget下载并执行安装脚本的方法,接着详细说明了在Ubuntu和CentOS系统中安装git的步骤。最后,演示了git克隆nvm仓库到本地,并配置bashrc文件使其生效,以及列出远程版本、安装特定版本和切换Node.js版本的命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

curl方式

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash

wget方式

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash

git方式

git config --global --unset http.proxy
git config --global --unset https.proxy

git clone git://github.com/creationix/nvm.git ~/nvm 
//https://github.com/nvm-sh/nvm.git
command -v nvm
echo "source ~/nvm/nvm.sh" >> ~/.bashrc
source ~/.bashrc
nvm list-remote

ubuntu系统

sudo apt-get install git

centos

sudo yum install git


source ~/.bashrc

nvm ls-remote
nvm install XX
nvm list
nvm use xx

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值