Q:

How I can launch Sublime Text 2 from the Mac OS X Terminal?

I have tried to launch Sublime Text 2 from Terminal, and I have followed the instruction on Github from this link https://gist.github.com/artero/1236170#installation ,but Im steel have problem. Im trying to make ~bin/ directory in Terminal $ mkdir -p /usr/local/bin   ,but I`m getting this error : mkdir: /usr/local/bin: Permission denied. How can I fix this.

A:

You need to use the sudo command, which essentially means you are running the command as user root. Be very careful when using sudo, as you can really mess up your system if you type something incorrectly.
To use it, make sure you have Administrator privileges. Then, run
sudo mkdir /usr/local/bin

to make /usr/local/bin, if it doesn't exist already. Then, run
sudo ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime

to create a sublime symlink in /usr/local/bin. Finally, edit your ~/.profile file to add /usr/local/bin to your PATH, save it, restart Terminal, and you should be all set.

