简介:前言最近入手一台mac mini,之前一直用的windows系统,此文记录我的mac使用记录。软件安装brew安装/bin/zsh -c "$(curl -fsSL https://gitee.com...

前言

最近入手一台mac mini,之前一直用的windows系统,此文记录我的mac使用记录。

软件安装

brew安装

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

phpPgOtST

nvm安装

brew install nvm

phpvNskXx

环境变量配置

h@hdeMac-mini ~ % brew list nvm
/opt/homebrew/Cellar/nvm/0.40.2/etc/bash_completion.d/nvm
/opt/homebrew/Cellar/nvm/0.40.2/libexec/ (2 files)
/opt/homebrew/Cellar/nvm/0.40.2/nvm-exec
/opt/homebrew/Cellar/nvm/0.40.2/nvm.sh
/opt/homebrew/Cellar/nvm/0.40.2/sbom.spdx.json

修改配置文件

# 修改文件 vim ~/.zshrc

# 内容
export NVM_DIR="$HOME/.nvm" 
[ -s "/opt/homebrew/Cellar/nvm/0.40.2/nvm.sh" ] && \. "/opt/homebrew/Cellar/nvm/0.40.2/nvm.sh" 
[ -s "/opt/homebrew/Cellar/nvm/0.40.2/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/Cellar/nvm/0.40.2/etc/bash_completion.d/nvm"

重载配置

source ~/.zshrc

查看配置

command -v nvm
nvm -v

安装Node

nvm install node

phpCkG1cP