genid
Generate unique identifiers (UUIDs) for resources
TLDR
Generate a UUIDv4
Generate a UUIDv5 using a namespace UUID and a specific name
Generate a Discord Snowflake, without a trailing newline (useful in shell scripts)
Generate a Generic Anonymous ID with a specific "real ID"
Generate a Snowflake with the epoch set to a specific date
SYNOPSIS
genid
DESCRIPTION
The genid command is a utility used to generate globally unique identifiers (GUIDs), also known as universally unique identifiers (UUIDs). These identifiers are 128-bit numbers designed to be unique across space and time, making them useful for identifying objects or data in distributed systems and databases. genid is part of the util-linux package and is a simple tool to quickly create these unique IDs directly from the command line.
GUIDs generated by genid can be used in various applications, including database keys, component identifiers, and software licensing. They offer a robust solution for ensuring uniqueness without central coordination. The tool provides basic functionality, focusing on generating random version 4 UUIDs. No alternative algorithms or options are generally available.
CAVEATS
The genid command is very basic. It typically generates only random (version 4) UUIDs. It lacks options to create UUIDs with specific formats or versions, or to manage existing UUIDs. For more sophisticated UUID management, consider using tools like uuidgen.
OUTPUT FORMAT
The genid command outputs a single UUID in standard string representation, conforming to RFC 4122. This format is a string of 36 characters (32 hexadecimal characters and 4 hyphens) arranged in the pattern 8-4-4-4-12.
HISTORY
The genid command is part of the util-linux package, a collection of basic system utilities for Linux. It has been available for a long time and its purpose is primarily for generating unique IDs. While initially used for simple data tagging it has become more useful with the growth of distributed systems where unique identifiers are more useful and important.
SEE ALSO
uuidgen(1)