Skip to content

Instantly share code, notes, and snippets.

@foyez
Last active January 15, 2022 05:40
Show Gist options
  • Select an option

  • Save foyez/f5657958907f8dd835fb1e19299997fe to your computer and use it in GitHub Desktop.

Select an option

Save foyez/f5657958907f8dd835fb1e19299997fe to your computer and use it in GitHub Desktop.
Step by step to setup nvm with linux and fish shell
  1. Update the package repository
sudo apt update
  1. Install NVM link
# using curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# or
# using wget
wget -q0- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
  1. Restart the terminal
  2. Install bass using oh-my-fish link
omf install bass
  1. Add fish function to ~/.config/fish/functions/nvm.fish to load nvm
function nvm
    bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv
end
  1. Chcek and verify nvm version
nvm -v
  1. Check running node version
nvm ls
  1. Check for newly available versions
nvm ls-remote
  1. Install a node version
nvm install [version.number] # nvm install 16.13.1
  1. Select a specific version
nvm use [version.number] # nvm use 16.13.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment