Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My ~/bin/makepass file:

    #! /bin/bash
    cat /dev/urandom | base64 --wrap ${1:-"10"} | head -n 1
Defaults to 10 character passwords, but you can put bigger numbers as the first argument. I don't think the `base64` command is on the Mac, so probably won't work there.


How about:

tr -dc '[:print:]' < /dev/urandom | head -c 20




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: