Reputation: 669
this is probably a very basic question. I am using the bash shell still (Catalina). And I downloaded gromacs. Every time I open a new terminal window I first have to put
source /usr/local/gromacs/bin/GMXRC
in first, otherwise I will just get command not found.
How can I permanently source this so that I don't have to reenter it all the time?
I tried editing the /etc/paths file but that didn't work.
Upvotes: 0
Views: 1768
Reputation: 6769
If you are still using the bash
shell on macOS
, all you have to do is:
Put the line:
source /usr/local/gromacs/bin/GMXRC
at the end in .bash_profile
.
.bash_profile
is in home directory, so you can open it like:
open ~/.bash_profile
Why .bash_profile?
.bash_profile
is executed whenever a login interactive shell starts and on mac, every interactive shell is a login shell by default.
If in case you switch to zsh
, instead of .bash_profile
, I think .zlogin
should be used.
But that would depend entirely on your need. Read about zsh configuration files in case you ever need that.
Upvotes: 1