$linuxjunkies
>

UID

also: User ID

UID (User ID) is a unique numerical identifier assigned to each user account on a Linux system. It is used internally by the kernel and filesystem to determine ownership and access permissions.

Every user on a Linux system is assigned a unique UID, a non-negative integer typically ranging from 0 to 65534 on most systems. The root user always has UID 0, while regular user accounts usually start at UID 1000 or higher (depending on the system). UIDs are stored in the /etc/passwd file alongside the human-readable username.

The kernel uses UIDs internally for all permission checks, ownership tracking, and access control—it doesn't need to know usernames. When you run a command as a user, the process runs with that user's UID, determining what files and resources it can access. For example, a file owned by UID 1000 can only be modified by processes running as UID 1000 (or as root, UID 0).

You can view your own UID with the id command, which displays your UID alongside your GID (group ID) and group memberships. Tools like ls -l display UIDs, though they are typically mapped back to usernames for readability.

Related terms