Finding a User’s UID and GID

If you want to know a quick way to check the UIDs of users and see what groups they belong to, ue the id command:

$ id carla
uid=1000(carla) gid=1000(carla) groups=1000(carla),20(dialout),24(cdrom),25(floppy),
29(audio),30(dip),44(video), 105(windows),432(usb),1001(cdrecording)

id has a few options:

-u Show the UID only.

-g Show the GID only.

-gn Show the user’s primary group name, instead of the GID.