Id
This command displays the user ID, group ID, user name and group name. The system uses this user ID to identify the files owned through the user. The group ID works the similar except and it is used for the group level identification.
Syntax
id [username]
If no user operand is given, the id utility will write the user and group IDs and the corresponding user and group names of the invoking procedure on the terminal.
The subsequent options can be used in id command
-g displays the output of group id
-u displays the output of user id
Practice 1
The given example displays the usage of the id command.
# id
uid = 102(sunil) gid = 40(radiant)
It can be seen in which the id command shown the user id and the group id. In the brackets in the given example are the username and the group name respectively.