Random password generator: many, in columns, on command line, in Linux
Solution 1
Sounds like you want pwgen
.
There are also some interesting ways to do this without installing additional software, but the 5-letter command is a bit easier to remember :)
Solution 2
According to your example output pwgen
is a good guess (see the answer of John T). But there are many such tools available:
- pwgen - generate pronounceable passwords
- gpw - program to generate pronounceable passwords
- apg - generates several random passwords
Also password managers such as KeePassX provide a passwort generator (but it does not focus on commandline usage nor on pronouncable passwords).
Solution 3
No need to install extra packages as OpenSSL should be installed on most machines. we can use the following code to generate an random password:
openssl rand -base64 10
Related videos on Youtube
Moiz
Updated on September 17, 2022Comments
-
Moiz over 1 year
A while back, I came across a random password generator for the command line that displayed a grid of "memorable" passwords. Output was something like this:
adam@host:~$ CantRememberThisCommand lkajsdf aksjdfl kqwrupo qwerpoi qwerklw zxlkelq
The idea was that you could run this utility while someone was looking over your shoulder, and still pick a password with some level of secrecy due to the large number of choices.
I cannot remember what this utility was called. Oh interwebs, can you help?
-
Tom A over 14 yearsNot quite an answer to your question, but Steve Gibson has something like this available online at grc.com/ppp.htm
-
-
John T over 14 yearsYou're more than welcome :)
-
spikeheap almost 11 yearsI keep coming back to this page because roughly every 6 months I need to generate a password but forget the command! Thanks!
-
Timo over 7 yearsThis is very handy, but strictly speaking taking random bytes and encoding them as base64 string does not necessarily mean a random string. E.g. all 10 char passwords generated like this will end in '=' (because of padding). Also the only other non alpha numeric characters included in these are + and /, which may not be optimal.
-
Daniel Earwicker about 6 yearsUse a value that is a multiple of 3 (e.g.
openssl rand -base64 12
) and there will be no trailing=
or==
. -
Sharak over 5 yearsadd
alias newpass="openssl rand -base64 12"
to shell config ie. ~/.zshrc for quick generation of random strings withnewpass
command