Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I don't know how to get my .profile aliases back in to the terminal every time I try them, this error massage comes up:

apaw:~ apaw$ cdp
-bash: cdp: command not found

How do i exit this -bash? I strongly believe it was named different while it still worked.

share|improve this question

2 Answers 2

I'm not sure I understand your question.

The -bash: prefix you see is simply bash's way of identifying itself as the source of the error message. In this case you entered cdp which is neither an external nor internal shell command nor was it defined as an alias or function.

While in a (bash) terminal, you can simply type exit to leave the terminal and close the shell session.

The aliases in your .profile are read when you start a new terminal or shell session, or if you source the files: e.g. source ~/.profile. That should re-read your .profile and load any changed aliases.

share|improve this answer
up vote 0 down vote accepted

Okay, I've found out what the problem was, some script has created a .bash_profile file that was overriding my .profile file, now I've removed the .bash_profile file and it works again!

share|improve this answer
2  
I recommend using .bash_profile instead of .profile, especially if it contains any bash-specific code. Also, if you're not already doing it this way: you should generally place customizations in .bashrc and have .bash_profile source .bashrc. .bashrc applies to login and non-login shells, but .profile (and .bash_profile) only apply to login shells. –  Chris Page Nov 9 '11 at 14:07

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.