Back to tools

UID and GID in Unix/Linux Systems

Every user and group on a Unix/Linux system has a unique numeric identifier called UID (User ID) and GID (Group ID). These numbers are used internally by the kernel to manage permissions.

Special UIDs

  • UID 0 (root) - The superuser has full system access
  • UID 1-99 - Reserved for system users (daemon, bin, sys)
  • UID 100-999 - Automatically generated system users
  • UID 1000+ - Regular users created by the administrator
  • UID 65534 (nobody) - Unprivileged user for NFS files

Common Use Cases

  • Docker USER: USER 1000:1000
  • NFS Permissions: chown -R 1000:1000 /data
  • /etc/passwd files: ubuntu:x:1000:1000:Ubuntu:/home/ubuntu:/bin/bash