getuid32(2)

getuid322

Get user identity

Part of getuid(2).

Usage

#include <unistd.h>

uid_t getuid(void); uid_t geteuid(void);

Library

Standard C library (libc, -lc)

Overview

getuid() returns the real user ID of the calling process.

geteuid() returns the effective user ID of the calling process.

Errors

These functions are always successful and never modify errno.

Releases

10 releases since Debian 5.0 (Lenny); the text changed 9 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13
  10. Arch

Standards

POSIX.1-2024.

History

4.3BSD, POSIX.1-1988.

In UNIX V6 the getuid() call returned (euid << 8) + uid. UNIX V7 introduced separate calls getuid() and geteuid().

The original Linux getuid() and geteuid() system calls supported only 16-bit user IDs. Subsequently, Linux 2.4 added getuid32() and geteuid32(), supporting 32-bit IDs. The glibc getuid() and geteuid() wrapper functions transparently deal with the variations across kernel versions.

On Alpha, instead of a pair of getuid() and geteuid() system calls, a single getxuid() system call is provided, which returns a pair of real and effective UIDs. The glibc getuid() and geteuid() wrapper functions transparently deal with this. See syscall(2) for details regarding register mapping.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.