Generate random hexadecimal in Linux

openssl rand -hex n

n - the length of string