The id command in Linux is a utility that displays user and group information for the current user or a specified user. It provides the following details:
- User ID (UID): A unique identifier for the user.
- Group ID (GID): The primary group identifier for the user.
- Groups: A list of all groups the user belongs to, including their IDs.
Basic Usage:
To use the id command, simply type:
id
Example Output:
uid=1001(labby) gid=1001(labby) groups=1001(labby),27(sudo)
This output indicates:
- The username is
labby. - The user ID is
1001. - The primary group is also
labbywith GID1001. - The user belongs to the
sudogroup as well.
If you have any more questions or need further details, let me know!
