Where to start First steps track · 15 stages
Linux Labs

UUID generator

Random v4 and time-ordered v7 UUIDs, up to a hundred at a time.

Version v4 is random, v7 starts with the time
How many
Result

How many UUIDs to create is not set

Type a number from 1 to 100 in “How many”.

Calculated in your browser — nothing is sent to the server

Practice on a machine

Lab “Volume won't mount”

medium ~20 min stage 2 of the “Storage” track

Open the lab

In a Linux terminal

bash
uuidgen # a new v4 UUID (uuid-runtime package) cat /proc/sys/kernel/random/uuid # the same from the kernel lsblk -f # file system UUIDs sudo blkid /dev/sdb1 # a partition's UUID for /etc/fstab

Refer to partitions in /etc/fstab by UUID: /dev/sdX names can change between boots.

FAQ

Can two v4 UUIDs collide?

Practically no: the chance of one collision reaches 50 % only after 2.7·10¹⁸ identifiers, a billion UUIDs a second for 85 years.

v4 or v7: which one to choose?

v7 for a database primary key: values grow over time and land at the end of the index. But v7 reveals when a record was created; where that matters, use v4.

What is the difference between a UUID and a GUID?

None: GUID is Microsoft's name for a UUID. Windows usually writes it in uppercase.

Loading…