Skip to content

Instantly share code, notes, and snippets.

@elliot-nelson
Created June 1, 2021 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elliot-nelson/7e1462101e238509d7b34b819bff3aa6 to your computer and use it in GitHub Desktop.
Save elliot-nelson/7e1462101e238509d7b34b819bff3aa6 to your computer and use it in GitHub Desktop.
Tip - User binary folder

Create a user binary folder on MacOS

A user binary folder is a great place to put personal scripts and links to often-used commands.

First, create a folder in your home folder -- you can call it anything, but I prefer to call mine bin:

mkdir ~/bin

Next, you'll need to add it to your PATH. Open (or create) the ~/.zshrc file and add a line like this:

export PATH=~/bin:$PATH

Note that this setting won't immediately apply to any open Terminal windows -- close and restart them, or, reload your zshrc like this:

source ~/.zshrc

You now have a convenient ~/bin folder where you can put shell scripts, soft links, and other tools you often use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment