2

I would like the command

PROMPT_COMMAND=echo

to be executed every time I open bash. I've been told that this command can be read from ~/.profile, however, I do not know how to put it there.

User 17670
  • 243
  • 4
  • 9

2 Answers2

3

echo 'PROMPT_COMMAND=echo' >> ~/.profile

Iron Savior
  • 4,238
  • 3
  • 25
  • 30
1

If you are on mac, you have to add it to

~/.bash_profile

If on linux, it'll go in

~/.bashrc
Siddhartha
  • 4,296
  • 6
  • 44
  • 65
  • 1
    That's not quite right. .bash_profile and .bashrc are both linux. .profile is mac. http://stackoverflow.com/questions/415403/whats-the-difference-between-bashrc-bash-profile-and-environment more info: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html – Aaron Oct 24 '13 at 16:45
  • 2
    Bash uses the same files on every OS, and uses both of these files for different purposes. – Random832 Oct 24 '13 at 16:45
  • 3
    More specifically, the Mac `Terminal` application starts a login shell by default, while most Linux-based terminal emulators start a non-login shell by default, hence the difference. – chepner Oct 24 '13 at 16:46