Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

id

v0.13.0
id [OPCIÓN]... [USUARIO]...

Mostrar información de usuario y grupo para cada USUARIO especificado, o (cuando se omite USUARIO) para el usuario actual.

Options

--ignore, -a

ignore, for compatibility with other versions

-A

Display the process audit user ID and other process audit properties,
which requires privilege (not available on Linux).

--user, -u

Display only the effective user ID as a number.

--group, -g

Display only the effective group ID as a number

--groups, -G

Display only the different group IDs as white-space separated numbers,
in no particular order.

-p

Make the output human-readable. Each display is on a separate line.

--name, -n

Display the name of the user or group ID for the -G, -g and -u options
instead of the number.
If any of the ID numbers cannot be mapped into
names, the number will be displayed as usual.

-P

Display the id as a password file entry.

--real, -r

Display the real ID for the -G, -g and -u options instead of
the effective ID.

--zero, -z

delimit entries with NUL characters, not whitespace;
not permitted in default format

--context, -Z

print only the security context of the process

La utilidad id muestra los nombres de usuario y grupo e IDs numéricos, del proceso que llama, a la salida estándar. Si los IDs reales y efectivos son diferentes, ambos se muestran, de otra manera solo se muestra el ID real.

Si se especifica un usuario (nombre de login o ID de usuario), se muestran los IDs de usuario y grupo de ese usuario. En este caso, se asume que los IDs reales y efectivos son los mismos.

Examples

Muestra la ID del usuario actual (UID), la ID del grupo (GID) y los grupos a los que pertenece:

id

Muestra la identidad del usuario actual:

id {{[-un|--user --name]}}

Muestra la identidad del usuario actual como un número:

id {{[-u|--user]}}

Muestra la identidad del grupo primario actual:

id {{[-gn|--group --name]}}

Muestra la identidad del grupo primario actual como un número:

id {{[-g|--group]}}

Muestra el ID (UID) de un usuario arbitrario, el ID de grupo (GID) y los grupos a los que pertenece:

id {{usuario}}

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.