Method 1: Using OpenSSL
openssl rand -base64 16Method 2: Using /dev/urandom
tr -dc 'A-Za-z0-9!@#$%&*' < /dev/urandom | head -c 20; echoMethod 3: Using pwgen
sudo apt install pwgen -y
pwgen -s 20 1
pwgen -snyc 20 1Method 4: Using gpg
gpg --gen-random --armor 1 16Password Policy Tips
- Minimum 16 characters
- Mix uppercase, lowercase, numbers, symbols
- No dictionary words
- Unique per service