Linux:

UUID=$(cat /proc/sys/kernel/random/uuid)

FreeBSD:

UUID=$(cat /compat/linux/proc/sys/kernel/random/uuid)

示例(Debian):

root@debian:~# cat /proc/sys/kernel/random/uuid
c95a7ee4-e5e0-4347-89b5-daed583335f2