Skip to content

In code

Generate a UUID in Bash

The uuidgen command ships on most Unix systems; Linux also exposes a UUID via the kernel.

Bash example

Bash
uuidgen
# Linux box without uuidgen:
cat /proc/sys/kernel/random/uuid

No install? Use the tool or API

Here's a fresh version 4 UUID generated right now — copy it, or call the API from any language.

2ccca02b-d4a0-4d3c-9aca-331365a36107
curl https://getuuid.sh/api/uuid

Other languages

← Full API reference