Linux has all the tools you need to generate a random password. This can be accomplished by a special file /dev/random
, that serves as a random number generator.
The Linux random number generator gathers environmental noise from device drivers and other sources into an entropy pool. To generate passwords based on the random number generator, try running the following commands on a Linux machine.
This method will generate a 8-character random password:
ibrahim@anfield-vm:~$ cat /dev/urandom | tr -dc "a-zA-Z0-9@#*=[]" | head -c8
This method uses the dd
command to output the password.
ibrahim@anfield-vm:~$ dd if=/dev/urandom bs=1 count=128 2>/dev/null | tr -dc "a-zA-Z0-9@#*=[]" | head -c8