0% found this document useful (0 votes)
25 views2 pages

Id Command

The id command prints real and effective user and group IDs for the current user or a specified username. It has options to print just the user ID, group ID, all group IDs, or the security context. Without any options, id prints the user name, user ID, group name, and group ID. Examples show how it reports this information.

Uploaded by

Darko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Id Command

The id command prints real and effective user and group IDs for the current user or a specified username. It has options to print just the user ID, group ID, all group IDs, or the security context. Without any options, id prints the user name, user ID, group name, and group ID. Examples show how it reports this information.

Uploaded by

Darko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Linux id command

Updated: 04/26/2017 by Computer Hope

• About id
• id syntax
• id examples
• Related commands
• Linux and Unix commands help

About id
Prints real and effective user and group IDs.

id syntax
id [OPTION]... [USERNAME]

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

Options
-a Ignored; included for compatibility with other versions.
-Z, --context Print only the security context of the current user.
-g, --group Print only the effective group ID.
-G, --groups Print all group IDs.
-n, --name Print a name instead of a number, for -ugG.
-r, --real Print the real ID instead of the effective ID, with -ugG.
-u, --user Print only the effective user ID.
--help Display this help and exit.
--version Output version information and exit.
If no OPTION is specified, id prints general user information.

id examples
id

Reports user and group IDs similar to the example below:


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

You might also like