-r, --random
Generate a random-based UUID. This method creates a UUID
consisting mostly of random bits. It requires that the
operating system has a high quality random number generator,
such as /dev/random.
-t, --time
Generate a time-based UUID. This method creates a UUID based
on the system clock plus the system’s ethernet hardware
address, if present.
-h, --help
Display help text and exit.
-V, --version
Print version and exit.
-m, --md5
Use MD5 as the hash algorithm.
-s, --sha1
Use SHA1 as the hash algorithm.
-n, --namespace namespace
Generate the hash with the namespace prefix. The namespace is
UUID, or '@ns' where "ns" is well-known predefined UUID
addressed by namespace name (see above).
-N, --name name
Generate the hash of the name.
-x, --hex
Interpret name name as a hexadecimal string.
uuidgen 命令实例:
uuidgen 创建随机
UUIDv4
:
uuidgen --random
uuidgen 根据当前时间创建
UUIDv1
:
uuidgen --time
uuidgen 创建具有指定命名空间前缀的名称的
UUIDv5
:
uuidgen --sha1 --namespace @dns|@url|@oid|@x500 --name object_name
uuidgen 命令扩展阅读:
blkid 命令
uuidgen 命令
pidof 命令
id 命令