LinuxCommandLibrary

uuidd

Generate universally unique identifiers (UUIDs)

TLDR

Generate a random UUID

$ uuidd [[-r|--random]]
copy

Generate a bulk number of random UUIDs
$ uuidd [[-r|--random]] [[-n|--uuids]] [number_of_uuids]
copy

Generate a time-based UUID, based on the current time and MAC address of the system
$ uuidd [[-t|--time]]
copy

SYNOPSIS

The uuidd is a system daemon and is typically not invoked directly by end-users to generate UUIDs. Instead, it runs in the background and is managed by system service managers like systemd (e.g., systemctl start uuidd). For system administrators, the daemon can be started with specific options for configuration or debugging purposes. The general syntax for direct daemon invocation (primarily for internal use or troubleshooting) is:

uuidd [OPTIONS]

PARAMETERS

-r, --random
    Requests a new seed for the random number generator. This can be used to re-seed the daemon's internal random pool for better entropy.

-s , --socket-path
    Specifies an alternate Unix domain socket path where the daemon should listen for client connections. The default path is typically /var/run/uuidd/request.

-d, --debug
    Enables debug messages, providing more verbose output to the system log, useful for troubleshooting daemon behavior.

-v, --version
    Prints the version information of the uuidd daemon and then exits.

DESCRIPTION

The uuidd command refers to the UUID generation daemon, a background service that provides high-quality, efficient UUIDs (Universally Unique Identifiers) to applications. It is part of the libuuid library from the util-linux project. Unlike uuidgen, which is a command-line tool for users to generate a single UUID, uuidd is designed to serve multiple concurrent requests from various system applications. Its primary purpose is to centralize the management of entropy sources for UUID generation, ensuring better randomness and preventing resource contention and duplicate UUIDs when many applications need to generate them frequently. By maintaining a pool of high-quality random data, uuidd can rapidly provide UUIDs, improving system performance and reliability for services that rely on unique identifiers. It operates as a socket-based service, allowing client applications to request UUIDs without direct access to the underlying random number generators.

CAVEATS

It is crucial to understand that uuidd is a background service and not a user-facing command for generating UUIDs. End-users should use the uuidgen(1) command for on-demand UUID generation. Attempting to run uuidd manually as a regular user is generally not recommended and typically results in permission errors or unexpected behavior, as it requires system-level privileges and proper service management.

DAEMON VS. COMMAND-LINE TOOL

uuidd runs continuously in the background, providing a service to other programs. This differs significantly from command-line tools like uuidgen, which execute once and terminate after performing their task. Applications connect to uuidd via a Unix domain socket to request UUIDs, leveraging the daemon's internal state for high-quality random data and improved performance.

SYSTEM SERVICE MANAGEMENT

On modern Linux distributions, uuidd is typically managed by systemd. Its status can be checked with systemctl status uuidd, started with systemctl start uuidd, and stopped with systemctl stop uuidd. This ensures proper initialization, logging, and dependency management within the operating system.

HISTORY

uuidd is part of the libuuid library, which itself is a component of the broader util-linux project. The libuuid library provides an API for generating and parsing UUIDs, and uuidd was introduced to provide a more robust and performant way for multiple applications to request UUIDs without each application needing to manage its own entropy pool. This centralized daemon approach helps in situations where high volumes of UUIDs are required, reducing contention and ensuring the quality of generated identifiers.

SEE ALSO

uuidgen(1), systemctl(1), libuuid(3), random(4)

Copied to clipboard