I've been having trouble modifying my path to add Sublime Text 2. I've added a ~/bin
directory and run this command:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
The subl link appears in ~/bin
. But I need to add the ~/bin
directory to my path. I'm fairly new at this, and I don't know where my path is. I've looked around, and found that the likely files are either .profile
, .bash_profile
or .bashrc
I don't have a .bash_profile
. To .profile
and .bashrc
I added
PATH=$PATH:~/bin/subl
export PATH
Is that the right thing to add? And if so, where should I add it?
When I echo $PATH
, I get:
/Users/<username>/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/bin:/Users/<username>/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/<username>/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/<username>/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
When I type subl
, I get:
-bash: subl: command not found
Thanks!
p.s. I had previously installed Macports, which modified my .profile
file. Not sure if this has anything to do with it - I now don't know what the default .profile
looks like.