Skip to main content
cat /dev/urandom | tr -dc 'a-fA-F0-9' | fold -w 8 | head -n 1

This will generate an 8 digits long hexadecimal number.