Examples (4)
Generate an 8-byte (16 characters) hex string and write it to `stdout`
openssl rand -hex 8Generate 20 random bytes encoded in base64
openssl rand -base64 20Generate random bytes and write them to a file (without encoding)
openssl rand -out path/to/file lengthGenerate 1 KiB/MiB/GiB/TiB random bytes encoded in hex/base64
openssl rand -hex|base64 1K|M|G|Tmade by @shridhargupta | data from tldr-pages