The system does not recognize you as your user account once you have logged on, it sees you as a user id (or UID). For example, if your user name is SmithB, Linux does not know you as SmithB but instead as a number (e.g. 105). To see what the UID of the current logged on user is, use the id command.

Not only does the id command show UIDs, it also displays group IDs (or GIDs). These GIDs show what primary security group a user belongs to (this affects file and directory access).

The -a option can be used to identify the user name, user ID, and all of the groups to which the user belongs.

Command Format

id [option(s)]

Example

$id
uid=105(chuck) gid=100(other)

$ su - sally
Password:

$ pwd
/home/sally

$ id
uid=106(sally) gid=100(other)
$

Here is what it would look like when modified with the -a option:

$ id -a

uid=106(sally) gid=100(other) groups=100(other)

$