On Unix-like operating systems, the id command prints the real and effective IDs of users and groups.

This page covers the GNU/Linux version of id.

Description

Print user and group information for the specified USERNAME, or (when USERNAME omitted) for the current user.

  • Description
  • Syntax
  • Examples
  • Related commands
  • Linux commands help

Syntax

id [OPTION]… [USERNAME]

Options

If no OPTION is specified, id prints general user information.

Examples

id

Reports user and group IDs similar to the example below:

uid=12345(comphope) gid=12(users)

finger — List information about a user.logname — Return a user’s login name.who — Report which users are logged in to the system.