Generate UUID in bash

Sometimes you may need to generate random UUIDs in bash shell. Here's a quick way to generate one :

uuidgen

If you need to get just the uuid and no dashes , you can use sed :

uuidgen | sed 's/-//g'

Another way to use the kernel random uuid

cat /proc/sys/kernel/random/uuid