1

I have the newest Mac OS 10.12.3. With the new rootless system Apple has implemented, I can't create a symbolic link using ln under /usr/bin. My goal is so that I can use subl in terminal. How can I do this?

5

The default directory for third-party executables in macOS is /usr/local/bin. Since this directory already is in the PATH you don't have to modify anything except sudo linking the executable to this dir.

If the directory doesn't exist, create it with sudo mkdir /usr/local/bin. If you plan to install brew later, it's recommended to change the owner of the bin folder to your user.

  • /bin does not exist under /usr/local/ – B.Li Jan 28 '17 at 0:09
  • @B.Li Then create it with sudo mkdir /usr/local/bin – klanomath Jan 28 '17 at 0:11
  • I don't think that automatically creates the link though. Terminal still doesn't recognize the command. – B.Li Jan 28 '17 at 0:48
  • @B.Li, Saying "Terminal still doesn't recognize the command." without also providing the exact command you tried and the exact error message, leaves us without any information to diagnose your issue! – user3439894 Apr 14 '17 at 14:52
-4

Basically you symlink it. See this answer on github gist https://gist.github.com/artero/1236170

  • 1
    Answers on Ask Different need to be more than just a link. It's okay to include a link, but please summarize or excerpt it in the answer. The idea is to make the answer stand alone. – nohillside Apr 14 '17 at 14:30
  • The OP is not asking how to create a symlink per se, as using ln was already mentioned, but how to deal with SIP while creating a symlink at /usr/bin. klanomath's answer already covers making the symlink at /usr/local/bin as suggested in the link you posted. – user3439894 Apr 14 '17 at 14:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .