Creating a symbolic link in /bin is not working
You're missing the '/' at the beginning of your app and sudo as /bin is owned by root and you can't actually write to it as a normal user. As you currently have it, it would only work if your present directory was the system root. This assumes of course that the Sublime Text app is in your main Applications folder.

Try this…

sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /bin/sub




One afterthought: It's considered bad practice to change the content of /bin and /usr/bin because any upcoming OS X upgrade may wipe the content there. /usr/local/bin is the usual place to install user-provided binaries in, so

[[ -d /usr/local/bin ]] || sudo mkdir /usr/local/bin
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sub


might be the better option.

Or (as you probably never need to run Sublime Text from within a shell script), simply define a bash alias

alias sub=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl


which should be added to your bash startup file to make it stick

echo "alias sub=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" &gt;&gt; ~/.bashrc