I'm running bash in Ubuntu, and I'm trying to run a computational chemistry program called Gaussian 16. My colleague tells me that he is able to run Gaussian 16 by adding the following lines to his
export g16root=/g16root source $g16root/g16/bsd/g16.profile
My colleague says that once he adds those lines to his
.bashrc file, he can run Gaussian 16 using the command
g16 <input file>, where
<input file> is the required input file.
.bashrc file is in my home directory (
~, in other words
/export/home/myusername/). When I add those above two lines to my
.bashrc file and then attempt
g16 <input file>, bash tells me it doesn't know what
g16 is ("
g16: command not found").
HOWEVER, if I execute (separately) those above two lines in bash (i.e., the above
source commands), then bash knows what
g16 <input file> runs the software, and additionally,
which g16 gives
/g16root/g16/g16. So this works, but I have to reenter the
source commands every time I log in to the (remote) machine.
Please bear with me since I'm a bash novice, but how do I get bash to "execute" the
source commands in my
In case it's helpful, the entirety of my
.bashrc file (other than commented lines) is now the following:
test -s ~/.alias && . ~/.alias || true if [ -f /etc/bashrc ]; then . /etc/bashrc fi export g16root=/g16root source $g16root/g16/bsd/g16.profile
(I don't know why the first two blocks of code are there.)
echo $BASH_VERSION gives
4.1.5(1)-release, so apparently I am actually using bash.