Generate Random String of Characters In the below command, 32 is the length of the string you’d like to create in character length. You can create a longer or shorter string by changing this value. openssl rand -base64 32