Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.