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
rootwithrwxpermissions is standard because the system (root) needs full control to manage executables - Group as
wheelwithr-x,wheelis traditionally the admin group on Unix systems - Others with
r-xbecause:- 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
- Everyone needs to be able to read (
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!