|
LINUX / UNIX cmd
|
Introduction |
Commands in A |
Commands in B |
Commands in C |
Commands in D |
Commands in E |
Commands in F |
Commands in G |
Commands in H |
Commands in I |
Commands in J |
Commands in K |
Commands in L |
Commands in M |
Commands in N |
Commands in P |
Commands in R |
Commands in S |
Commands in T |
Commands in U |
Commands in W |
Commands in Y |
Ask your doubts |
More about Linux |
Feedback |
|
|
|
|
|
Tutorials

Linux-commands

|
Topic |
What is Linux id Command?
|
|
Explanation |
id COMMAND:
id command prints the effective(current) and real userid(UID)s and groupid(GID)s.
SYNTAX:
The Syntax is
id [options]
OPTIONS:
| -a |
Reports user name, use ID and all the groups to which the user belongs. |
| -G |
Output all real and effective group IDs,using the format "%u\n". |
| -g |
Output only the effective group IDs,using the format "%u\n". |
| -u |
Output only the effective user Id,using the format "%u\n". |
EXAMPLE:
-
id -a
Output:
uid=501(username) gid=501(username) groups=48(apache),
501(username)
Prints real and current group IDs.
id -G
Output:
501 48
Prints in the format of "%u\n"
# id
Output:
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),
4(adm),6(disk),10(wheel) context=user_u:system_r:unconfined_t
The above example display the rootuser uid, gid, groups and context.
|
| A Note |
Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.
|
|
|
|