System Information

id

Shows user and group IDs.

id displays the numeric UID, primary GID, and group memberships for a user.

Syntax
id [user]

Arguments explained

  • user is optional; without it id shows the current user.
  • -u prints only user ID.
  • -g prints only primary group ID.
  • -n prints names with some options.

Common examples

Show your identity
id

Prints UID, GID, and groups for your current user.

Check another user
id www-data

Shows service account identity and groups.

id Command
FieldDetails
Commandid
CategorySystem Information
Primary useShows user and group IDs.
Syntaxid [user]