user2780256
user2780256

Reputation: 31

Subl will not open in Terminal even with bin folder

I can't open Sublime Text 2 from my terminal even though I have a bin folder and it says the file exists. I keep getting bash: subl: command not found...

~ » ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
ln: /Users/kimbalin/bin/subl: File exists
~ » 
~ » ls
Applications        Movies          Sites
Desktop         Music           bin
Documents       Pictures        code
Downloads       Public          
Dropbox         
~ » subl
-bash: subl: command not found
~ » subl --help
-bash: subl: command not found
~ » cd bin
~/bin » ls
subl
~/bin »

Upvotes: 2

Views: 224

Answers (1)

dts
dts

Reputation: 43

If you try to put the subl script in your ~/bin folder, you also have to make sure that your ~/bin folder in in the $PATH.

You can easily check this by typing this in your terminal.

echo $PATH

If ~/bin is not there, you can add it using this command: (see https://askubuntu.com/questions/402353/how-to-add-home-username-bin-to-path for more)

export PATH=$PATH:$HOME/bin

Otherwise, you can try to install the subl script in the root /bin folder. However, you'll probably need sudo for that (administrator rights).

ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl

Upvotes: 3

Related Questions