Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Before touching .bash_profile:

mongod launches a mongo server, rabbitmq-server launches a rabbit server, etc.

But once I add:

alias ethertunes="sudo NODE_ENV=development nodemon --debug ~/ethertunes/src/cluster/launcher.js"

all my other commands are gone. (Still have ls and CD and such though...)

What am I doing wrong?

share|improve this question

Are your other aliases and such defined in ~/.profile? If so, that'll be overridden by ~/.bash_profile, so everything in .profile becomes unavailable. Solution: merge them; put all your definitions into a single profile file, rather than having them split between two files. It doesn't really matter which name you use (.profile or .bash_profile) unless you have commands that depend on bash extensions -- in that case use .bash_profile.

Another possibility is that your old definitions were in .bash_profile, and when you added the new command you replaced (rather than adding to) the old contents. In this case, you have to either look for a backup or set about recreating whatever you had in there.

share|improve this answer
In fact, it's good form to put most of your customizations in ~/.bashrc and have ~/.bash_profile run ~/.bashrc. Then they'll apply to login and non-login shells. ~/.bash_profile should contain things that are really intended only for login shells. – Chris Page Sep 28 '11 at 7:48

You must log in to answer this question.

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