Skip to content

Instantly share code, notes, and snippets.

@plencovich
Created March 18, 2018 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plencovich/ac7ddccaf0034207085cbb013069215a to your computer and use it in GitHub Desktop.
Save plencovich/ac7ddccaf0034207085cbb013069215a to your computer and use it in GitHub Desktop.
Genera password en la consola de linux

Generar contraseña desde la consola de linux, agregando esta funcion en el .bashrc

genpasswd() {
	local l=$1
	[ "$l" == "" ] && l=20
	tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment