Attempted to add to this question: NVM Command Not Found, however wasn't able to.

After installing nvm im having the same issue, here is the log from terminal:

Michael-iMac:~ michaels_imac$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1202  100  1202    0     0   5759      0 --:--:-- --:--:-- --:--:--  6829
=> NVM is already installed in /Users/michaels_imac/.nvm, trying to update
Already up-to-date.

Michaels-iMac:~ michaels_imac$ nvm install 0.8

-bash: nvm: command not found

2 Answers 2


The problem seems to be that gnome terminal does not load ~/.profile on startup, and there is where NVM is added to the path. You have two choices:

  • Go to "Edit" -> "Profile Preferences" in terminal and activate "Run command as a login shell". Then close and open again the terminal.

enter image description here

  • Add this at the end of ~/.bashrc:

    [[ -s /home/$USER/.nvm/nvm.sh ]] && . /home/$USER/.nvm/nvm.sh
  • Idiotically I've just realised since im using OS X this is not the ideal location for this question, I posted here due to this being the only place I found a question on nvm. I dont suppose you know the OSX Terminal equivalent solution to this, or what i should be searching for? Apologies.
    – dntz
    Apr 8, 2013 at 14:19
  • If you are using bash as shell the second way still works (to know which shell you are running use echo $SHELL). If you are using zsh the correct file is ~/.zshrc. Also check this.
    – Salem
    Apr 8, 2013 at 17:16
  • entering echo $SHELL returns /bin/bash, im not sure where to go from here. Have tried entering what you suggested above and just get a new line the same as the one previous. Do i need to navigate to bashrc before entering [[ -s /home/$USER/.nvm/nvm.sh ]] && . /home/$USER/.nvm/nvm.sh? Sorry about my lack of command line experience.
    – dntz
    Apr 9, 2013 at 15:09
  • You need to open .bashrc (it is a hidden file located on your home folder: if it doesn't exist you can create a blank one) with a text editor and add [[ -s /home/$USER/.nvm/nvm.sh ]] && . /home/$USER/.nvm/nvm.sh at the end.
    – Salem
    Apr 9, 2013 at 15:13
  • @dntz Did you manage to solve your problem?
    – Salem
    May 14, 2013 at 14:01

i think you have miss this step

source ~/.nvm/nvm.sh

You can run this command on the bash OR you can but under the file /.bashrc or ~/.profile to automatically load



Not the answer you're looking for? Browse other questions tagged .