% ssh-keygen -t ed25519 -C "samzhu'mac" -P "" Generating public/private ed25519 key pair. Enter file inwhich to save the key (/Users/samzhu/.ssh/id_ed25519): Created directory '/Users/samzhu/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/samzhu/.ssh/id_ed25519 Your public key has been saved in /Users/samzhu/.ssh/id_ed25519.pub The key fingerprint is: SHA256:ZG/BLmGG0QbjTIPhZ3MPxKhVgnzchM92bRvLTdR2HWw github_spike19820318 The key's randomart image is: +--[ED25519 256]--+ | ..=BX+ .oo| | .++*B=. .E=| | .+B+O o. ....| | .o B+*..+ . | | .S.=o * | | o + . | | | | | | | +----[SHA256]-----+ % cat ~/.ssh/id_ed25519.pub
==> Checking for `sudo` access (which may request your password)... Password: ==> This script will install: /opt/homebrew/bin/brew /opt/homebrew/share/doc/homebrew /opt/homebrew/share/man/man1/brew.1 /opt/homebrew/share/zsh/site-functions/_brew /opt/homebrew/etc/bash_completion.d/brew /opt/homebrew ==> The following new directories will be created: /opt/homebrew/bin /opt/homebrew/etc ... Downloading Command Line Tools for Xcode ==> Homebrew is run entirely by unpaid volunteers. Please consider donating: https://github.com/Homebrew/brew#donations
==> Next steps: - Run these two commands in your terminal to add Homebrew to your PATH: echo'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/samzhu/.zprofile eval"$(/opt/homebrew/bin/brew shellenv)" - Run brew help to get started - Further documentation: https://docs.brew.sh
% brew install nvm Please note that upstream has asked us to make explicit managing nvm via Homebrew is unsupported by them and you should check any problems against the standard nvm install method prior to reporting.
You should create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
Add the following to ~/.zshrc or your desired shell configuration file:
You can set$NVM_DIR to any location, but leaving it unchanged from /opt/homebrew/opt/nvm will destroy any nvm-installed Node installations upon upgrade/reinstall.
Type `nvm help` for further information. ==> Summary 🍺 /opt/homebrew/Cellar/nvm/0.39.1_1: 9 files, 184.1KB ==> Running `brew cleanup nvm`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
List all installable versions
1
nvm ls-remote
Install the specified version
1
nvm install v16.15.0
Uninstall
1
nvm uninstall v15.12.0
Select the version to use
1
nvm use v15.12.0
Show the version currently in use
1
nvm current
Set default node version
1
nvm alias default <version>
Using nvm in a project, create a .nvmrc file with the content:
1
v15.12.0
In the terminal we can use which node to see where our node is installed