I have configured my Ubuntu 14.04 with dotfiles found here Mathias Dotfiles. Everything is going smooth, I installed both RVM(Ruby Version Manager) and NVM(Node Version Manager). In order for both of them to work, I have to source the nvm.sh(for Node) and .profile(for Ruby).

When I source them from the interactive terminal, everything works great, I can use both node and ruby. But I would really want to be sourced automatically, so it says one the documentation to add it to my .bashrc file. Problem is that I have added it my .bashrc file in all sorts of ways and it just crashes my terminal. It seems to be loading the .profile and .nvm/nvm.sh, but then it crashes, so I have to end up removing it. And yes, I do source my .bashrc file after I'm done editing it.

Here is my .bashrc file after I tried to source it

[ -n "$PS1" ] && source ~/.bash_profile;

source /home/$USER/.profile
source /home/$USER/.nvm/nvm.sh

I have tried putting it full path, using $HOME, and also adding it to .bash_profile. It works when in interactive terminal mode, why does it crash in .bashrc .

OS: Ubuntu 14.04 64 bit on VMware 11 Shell: Bash

  • ~/.bash_profile is read by interactive login shells only. How do you start this shell? – Hauke Laging Jan 11 '15 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.