The id command in Linux is used to display user and group information for the current user or a specified user. It provides details such as:
- User ID (UID): A unique identifier for the user.
- Group ID (GID): The primary group associated with the user.
- Groups: A list of all groups the user belongs to, including their GIDs.
Basic Usage
To use the id command, simply type:
id
This will show your own user and group information. To check another user's information, use:
id username
Example Output
uid=1001(john) gid=1001(john) groups=1001(john),27(sudo)
This output indicates that the user "john" has a UID of 1001, belongs to the group "john" with a GID of 1001, and is also part of the "sudo" group.
If you have any more questions or need further details, feel free to ask!
