How to Find UID and GID
The Linux and Unix operating systems use the UID -- user ID -- to identify a particular user. The GID, or group ID, is used to identify a group. Each user will have a single, unique UID and a primary GID. The user can belong to several secondary groups and each secondary group will have a unique GID. The "id" command can be used to show the UID and GIDs for a particular user. The root (super) user can view the UID and GID for any user. If you do not have root privileges, you can only view your own UID and GID.
Things You'll Need
- Linux or Unix operating system
Open a terminal window. The terminal application is usually found in the "Accessories," "Utilities" or "Tools" section of the main "Programs" or "Applications" menu.
Type the command "su" to become the root user. Skip this step if you do not have root user privileges or want to find the UID or GID for your own account.
Type the command "id -u
Type the command "id -g
Type the command "id -G
Type the command "exit" to close the root user session.