Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI Exam 102-500 Topic 2 Question 107 Discussion

Actual exam question for LPI's 102-500 exam
Question #: 107
Topic #: 2
[All 102-500 Questions]

What command will display the group names and GIDs to which a user belongs? (Provide only the command name with or without path information)

Show Suggested Answer Hide Answer
Suggested Answer: A

Theidcommand will display the user ID (uid), the primary group ID (gid), and the supplementary groups (groups) of a user. The output will show the names and the numerical IDs of the groups. For example:

id linuxize

The command will show the user ID (uid), the user's primary group (gid), and the user's secondary groups (groups)

uid=1001(linuxize) gid=1001(linuxize) groups=1001(linuxize),27(sudo)

To print only the names instead of the numbers use the-noption.

id -nG linuxize

The command will show only the names of the groups

linuxize sudo

Theidcommand is part of the GNU coreutils package and is available on all Linux systems. The full path of the command is/usr/bin/id.Reference:

id(1) - Linux manual page

How to List Groups in Linux | Linuxize


Contribute your Thoughts:

Shawnda
2 days ago
I remember practicing with similar questions, and I think it's just `id` without the path.
upvoted 0 times
...
Janella
8 days ago
I think the command is `id`, but I'm not entirely sure if I need to include the path.
upvoted 0 times
...
Dustin
13 days ago
I'm a bit confused on this one. I know there's a command to display group information, but I can't recall the exact syntax off the top of my head. I'll have to think it through carefully.
upvoted 0 times
...
Ben
19 days ago
The question is asking for just the command name, so I'll go with `id` since that seems to be the right command to use.
upvoted 0 times
...
Holley
24 days ago
Okay, I remember learning about this in class. I believe the correct command is `id -Gn` to show the group names and GIDs.
upvoted 0 times
...
An
29 days ago
Hmm, I'm not sure about that. I'll need to double-check the syntax for the `id` command to make sure it includes the group information.
upvoted 0 times
...
Avery
1 month ago
I think the command to display the group names and GIDs for a user is `id`.
upvoted 0 times
...
Krystal
2 months ago
If `idusrbinid` was a real command, I'm pretty sure it would have been mentioned in the man pages. `id` is the way to go.
upvoted 0 times
...
Leanora
2 months ago
Haha, `idusrbinid`? What kind of made-up command is that? I'm definitely choosing `id`.
upvoted 0 times
Lawrence
2 months ago
Yeah, `id` is the correct command to display group names and GIDs.
upvoted 0 times
...
...
Corrinne
3 months ago
Wait, `idusrbinid`? That's not a real command, is it? I'll stick with `id` for this one.
upvoted 0 times
...
Dalene
3 months ago
Hmm, `idusrbinid` sounds like a made-up command. I'm going with `id` as the correct answer.
upvoted 0 times
Julene
1 month ago
Definitely id, that's the command to display group names and GIDs.
upvoted 0 times
...
Julie
2 months ago
I think the correct command is id.
upvoted 0 times
...
Isabella
2 months ago
Yes, you're right. It is id.
upvoted 0 times
...
Willie
3 months ago
I think the correct command is id.
upvoted 0 times
...
...
Felix
3 months ago
id
upvoted 0 times
...
Jeannetta
3 months ago
id
upvoted 0 times
...
Albert
3 months ago
id
upvoted 0 times
...
Coral
4 months ago
I think the correct answer is `id`. It's a simple and straightforward command to display user group information.
upvoted 0 times
Patria
2 months ago
I always use `id` to check user group information.
upvoted 0 times
...
Alida
2 months ago
Yes, you are correct. The command is `id`.
upvoted 0 times
...
...
Kris
4 months ago
id
upvoted 0 times
...
Hershel
4 months ago
id
upvoted 0 times
...

Save Cancel