Generating Secure Strings (Passwords) on Linux
By: Cam Wohlfeil
Published: 2018-09-13 1300 EDT
Category: Solutions
Tags:
linux
Recently, I was separated from my usual password manager (KeePass w/ a synchronized database) and needed to generate a random password to add to my database later. Luckily, I had sudo access to a Linux command line, so this was as easy as running sudo apt-get install pwgen
and pwgen -s 15 1
.
As the name implies, pwgen
is a tool for generating random secure strings, mainly for use as random usernames and passwords. The -s
is for more secure, completely random, hard to remember secure strings. Like with KeePass the default is only alphanumeric characters, which I prefer for occasions when I have to manually type a password. The first number is for the length of the secure strings, and the second is for the number of secure strings you want to generate.
References