id (Unix)

From Wikipedia, the free encyclopedia
Jump to: navigation, search

In computer software, id is a program in Unix-like operating systems that prints the user or group identifier of the account by which the program is executed; an example of the command id as executed by user alice:

alice@darkstar:~$ id
uid=1016(alice) gid=100(users) groups=100(users)

The root account has a UID of 0:

root@darkstar:~# id
uid=0(root) gid=0(root) groups=0(root)

The whoami utility has been obsoleted by the id utility and displays a user's ID as a name:

alice@darkstar:~$ whoami
alice
alice@darkstar:~$ id -un   # Where `-u` refers to `--user` and `-n` refers to `--name`
alice

See also[edit]

References[edit]