Installing Sublime Text's command line tool 'subl' in terminal, permission denied?

后端 未结 3 815
孤街浪徒
孤街浪徒 2020-12-22 16:47

I\'m tryng to use Sublime Text from the terminal, for example by typing subl.

I\'m following the steps from Sublime Text\'s website:

3条回答
  •  天命终不由人
    2020-12-22 17:40

    My personal preference for the path to the third-party application-specific symbolic links (e.g. subl, brew, github, mate, etc) is:

    /usr/local/bin
    

    Why not /usr/bin/?

    1. /usr/bin is a "sacred" place. It is generally recommended to store static binaries that are maintained by package management systems. subl is not this case.

    2. subl is not stable enough to be stored in /usr/bin with other basic BSD binaries (e.g. find, man, make, etc). You must modify/delete subl symbolic link manually if (a) the developers of Sublime Text Editor decide to change its app name in the future releases (as BBEdit Lite was changed to TextWrangler after version 6.1), or (b) you may simply wish to uninstall Sublime Text Editor.


    Therefore, I suggest you execute the following line, assuming /usr/local/bin/ exists:

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

提交回复
热议问题