Reputation: 44332
I'm trying to get Sublime Text 2 to open from Terminal. I'm using the following:
MacBook-Pro:project2 myusername$ ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
ln: /Users/myusername/bin/subl: No such file or directory
I'm not sure what is wrong. I'm following all the examples out there. Am I missing something?
Here's the output of an echo $PATH (updated path):
/Users/myusername/bin:/Users/myusername/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
This is on OSX 10.11.1
Upvotes: 1
Views: 64
Reputation: 22089
Use one of these 2 commands:
sudo ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl ~/bin/subl
or
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
Upvotes: 0
Reputation: 1167
You most probably do not have a bin
folder in your home directory. Create one by using
mkdir ~/bin
This will create the bin
folder in your /Users/yourusername/
directory. In terminal the ~
is short for your home.
You will also have to append this folder to your path, i.e. create (or edit if it exists) a .profile
file in your home directory and give it this content:
export PATH=/Users/yourusername/bin:$PATH
You will have to open a new terminal for this change to take place.
Upvotes: 1