First you need to make hidden files visible. Type this in the command line:
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
You need to get the to paths.d
folder. On my system, it's possible to just type "cd /private/etc/paths.d
"
However, you should be able to open Finder, navigate to the top most directory for your MAC hard drive. Find the etc
folder, then the paths.d
folder.
Inside this folder create any file you want, I created a file called "Bio" for all my bioinformatics software.
Here you can put the location of the binary files that you want to run universally. So you can write something like "/Users/yourusername/Desktop/bwa/
"
(Change "yourusername" to your actual username.)
Assuming bwa is in a folder on your Desktop for example.
To make the system files hidden again type:
defaults write com.apple.finder AppleShowAllFiles -bool false
killall Finder
You might need to restart terminal, but you should to be able to use bwa from the commandline
But how do I specify the full path: ie. /Users//bin/bwa I talked to some and they told me I need to create a .bash profile I really don't understand
My post above has the line to put in your bash profile (the file is called .bash_profile) for altering your path variable to include the /usr/local/bin directory and, in my case, the /Users/dan/bin directory.
When I said specify the full path what I meant was that on the command line instead of just typing bwa you would type something like /Users/dan/bin/bwa or /usr/local/bin/bwa
What you may want is to read a brief primer on the unix command line. OS X is a UNIX system.