Linux / UNIX: Generating Random Password With mkpasswd / makepasswd / pwgen

Linux / UNIX: Generating Random Password With mkpasswd / makepasswd / pwgen

There are several tools that you can use to generate random passwords on a Linux or UNIX system, including mkpasswd, makepasswd, and pwgen.

Here is how you can use each of these tools to generate a random password:

  1. mkpasswd: To generate a random password with mkpasswd, you can use the following command:
mkpasswd -l 16
So‮ecru‬:www.lautturi.com

This will generate a random password with 16 characters.

  1. makepasswd: To generate a random password with makepasswd, you can use the following command:
makepasswd --chars 16

This will generate a random password with 16 characters.

  1. pwgen: To generate a random password with pwgen, you can use the following command:
pwgen 16 1

This will generate a random password with 16 characters.

You can adjust the number of characters in the password by changing the value after -l, --chars, or 16 in the above commands.

Created Time:2017-10-29 22:08:56  Author:lautturi