Back to the command reference

id

UsersBeginner In simulator In real Linux

Print user and group IDs

Name: id = identity

You can practise it right away in the simulator, and use it in real Linux mode too.

Description

id shows a user's UID, primary GID and all groups, for you or a named user. These numbers are what permission checks actually use.

Syntax

id [OPTION]... [USER]

Common options

-u / --userOnly the user ID
-g / --groupOnly the primary group ID
-G / --groupsAll group IDs
-n / --nameShow names instead of numbers (with -u/-g)

Examples

Related