On Linux, the
util-linux-ng package offers a command to generate UUIDs:
To quote the manual:
The uuidgen program creates (and prints) a new universally unique identifier (UUID) using the
libuuid(3) library. The new UUID can reasonably be considered unique among all UUIDs created on the local system, and among UUIDs created on other systems in the past and in the future.
There are two types of UUIDs which uuidgen can generate: time-based UUIDs and random-based UUIDs. By default uuidgen will generate a random-based UUID if a high-quality random number generator is present. Otherwise, it will choose a time-based UUID. It is possible to force the generation of one of these two UUID types by using the
Addendum: The OP had provided a link in the comments to the documentation for Presto DB. After a bit of searching, I found this related discussion where it is explicitly mentioned that the
node.id property is indeed a UUID.
Adding the information provided by frostschutz in a comment:
As an alternative to the
libuuid approach, you can make use of an interface exposed by the Linux kernel itself to generate UUIDs:
$ cat /proc/sys/kernel/random/uuid
The UUID is re-generated on each request.