Quantcast
Channel: password – ShellHacks
Viewing all articles
Browse latest Browse all 3

Generating Random Passwords in the Linux Command Line

$
0
0

You can use the following command to generate the random password: $ tr -dc A-Za-z0-9 < /dev/urandom | head -c 8 | xargs Sample output: 4fFUND1d You can create a bash shell function as follows (add to your ~/.bashrc): # Random password generator genpasswd() { tr -dc A-Za-z0-9 < /dev/urandom | head -c ${1:-8} | […]

The post Generating Random Passwords in the Linux Command Line appeared first on ShellHacks.


Viewing all articles
Browse latest Browse all 3

Trending Articles