id
Display user and group identity information
TLDR
Show current user info
SYNOPSIS
id [options] [user]
DESCRIPTION
id displays user and group identity information. It shows the real and effective user ID (UID), primary group ID (GID), and all supplementary group memberships for the specified user or the current user.
The command is commonly used in scripts to check privileges, verify group memberships, and determine access rights. Without arguments, it reports information about the invoking user. With a username argument, it reports on that user instead.
PARAMETERS
USER
Username to query.-u, --user
Print user ID only.-g, --group
Print primary group ID.-G, --groups
Print all group IDs.-n, --name
Print names instead of IDs.-r, --real
Print real ID.--help
Display help information.
CAVEATS
Part of coreutils. Shows cached info at login. Real vs effective ID support.
HISTORY
id is a standard Unix command, part of GNU coreutils on Linux.
