What is the id command?

QuestionsQuestions8 SkillsProYour First Linux LabAug, 30 2025
0195

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 labby with GID 1001.
  • The user belongs to the sudo group as well.

If you have any more questions or need further details, let me know!

0 Comments

no data
Be the first to share your comment!