The following terminal session commands use bash for the shell. Adapt them for your flavor of shell.

See also

See the nvm install and update script documentation. For the fish shell, see nvm.fish.

  1. Create your shell profile, if it does not exist.

    touch ~/.bash_profile
    
  2. Download and run the nvm install and update script, and pipe it into bash.

    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.5/install.sh | bash
    
  3. Source your profile. Alternatively close the session and open a new one.

    source ~/.bash_profile
    
  4. Verify that the nvm version is that which you just installed or updated:

    nvm --version