Skip to content

Instantly share code, notes, and snippets.

@atulsingh0
Created July 18, 2022 15:48
Show Gist options
  • Save atulsingh0/b06619173024d25b49d3f122953aa9fa to your computer and use it in GitHub Desktop.
Save atulsingh0/b06619173024d25b49d3f122953aa9fa to your computer and use it in GitHub Desktop.
Random Generation of Password String in Linux, Mac & Windows (WSL)
alias randstr='cat /dev/urandom | env LC_ALL=C tr -dc 'A-Za-z0-9' | head -c'
# usage
randstr 20 # lmfcYuRZ0xAlRZhN3Uy2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment