id command

The command that prints the user and group identity a command is running as.

In more detail

id -u prints only the numeric user ID and id -g the group ID. Numbers avoid any confusion about display names.

Example

ansible localhost -m ansible.builtin.command -a "id -u" shows which account a task really ran as.

Related terms

Taught in

References

Certification courses