Test on the terminal (just paste it on the terminal and execute it):
env LC_CTYPE=C tr -dc A-Za-z0-9_ < /dev/urandom | head -c "16" | xargs
If the shell you use is bash, you can add it to ./bash_profile as follows:
alias gpw='genpasswd'
genpasswd() {
env LC_CTYPE=C tr -dc A-Za-z0-9_ < /dev/urandom | head -c "16" | xargs
}
Remember to update source ~/.bash_profile
take effect.Then we only need to enter gpw to generate a set of random passwords.
No Comment
Post your comment