Create /usr/local/bin in macOS

It’s 2025, and /usr/local/bin still not a directory in MacOS (15.1) πŸ€¦β€β™‚οΈ . Programs you download (via Homebrew or online) are usually set inside this folder.

Here the correct way to create it:

sudo mkdir -p /usr/local/bin
sudo chmod 755 /usr/local/bin

Why 755?. It follows the principle of least privilege while still allowing the necessary functionality - anyone can use the programs, but only root can modify them:

  • Owner as root with rwx permissions is standard because the system (root) needs full control to manage executables
  • Group as wheel with r-x, wheel is traditionally the admin group on Unix systems
  • Others with r-x because:
    • Everyone needs to be able to read (r) and execute (x) programs in this directory
    • They shouldn’t be able to write (w) to it, which prevents regular users from modifying system binaries

Hope this helps.

Next reads:

πŸ‡ΉπŸ‡Ό The world next innovations depend on a single country, Taiwan

Liked it?

As always, hit me up and let’s hang out. I'm now focused on PlayCraft: turning marketing campaigns into engaging games in seconds (with AI).
I also gather developers in Taiwan through TaipeiDev - come join us if you're in Taipei!


Reddit
WhatsApp