Skip to content

Instantly share code, notes, and snippets.

@iamjohnmills
Last active May 16, 2026 14:54
Show Gist options
  • Select an option

  • Save iamjohnmills/5368270e788216f02352dfa90a3b8426 to your computer and use it in GitHub Desktop.

Select an option

Save iamjohnmills/5368270e788216f02352dfa90a3b8426 to your computer and use it in GitHub Desktop.
Macos Generate Password in Terminal
pw=$( (LC_ALL=C tr -dc 'A-Z' < /dev/urandom | head -c 1; LC_ALL=C tr -dc 'a-z' < /dev/urandom | head -c 1; LC_ALL=C tr -dc '!@#$%^&*' < /dev/urandom | head -c 1; LC_ALL=C tr -dc 'A-Za-z0-9!@#$%^&*' < /dev/urandom | head -c 9) | perl -MList::Util=shuffle -e 'print shuffle <>' ); echo $pw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment