Quick actions

cmd+k|ctrl+k

Navigation

Languages

Random

Snippet info

Language

Bash

Visibility

public

Author

gurutech

Created

2018-01-02T18:41:48Z

Updated

2018-01-03T12:38:33Z

# Do you like it? Follow me on telegram: https://t.me/linuxcheatsheet

# Generate a random password using ONLY basic available commands.
# Tested to work on busybox
# Run it online from glot.io to check how it works


tr -dc '[:alnum:]' < /dev/urandom | head -c10


# This was really overkill. Forgive me but I wrote it after new year party. Hic!
#dd if=/dev/urandom status=none bs=1 count=1000 status=none |\
#    od -c | sed -re "s/.* ([a-zA-Z0-9]) .*/\1/g" |\
#    grep -E "^[a-zA-Z0-9]$" | head -10 |\
#    tr -d  "\n" | grep .
INFO