Random alphanumeric string from the command line

head -c 500 /dev/urandom | base64 | sed 's/[^a-zA-Z0-9]//g'