I have no experience with using Terminal but I am trying to install a program msbayes (installation instructions here.

The instructions say to set up an execution path using either

$ echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile


$ echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bash_profile

I have tried both of these but am still getting a command not found response. What am I doing wrong? Any advice?

  • Can you copy and paste the error message you are getting?
    – tyelford
    Commented Mar 23, 2016 at 4:57

1 Answer 1


Are you copying the dollar sign into terminal? The dollar sign in writing, like in the document, is just a sign that it is on a new terminal line.

You can copy and paste these commands into terminal and it should work. I just tried it on my machine

echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile


echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bash_profile

Then you can verify that they have worked by typing in this command

cat ~/.bash_profile

And you should see

export PATH=$PATH:$HOME/bin


export PATH=$PATH:/usr/local/bin

Depending on which one you used.

If you want the changes to also be applied to the currently running shell, you need to run

. ~/.bash_profile

as well.

  • Thanks this seems to have worked but I still then get a "command not found" response when I try to do anything in the program
    – Gilchrist
    Commented Apr 3, 2016 at 3:18
  • Can you copy and paste the command you are running?
    – tyelford
    Commented Apr 3, 2016 at 3:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .