What is id command in Linux?

The id command in Linux is a command-line utility that is used to print user and group information for the specified user or for the current user if no user is specified. This information includes the user's UID (User ID), GID (Group ID), and the groups the user belongs to.

Syntax:

id [OPTION]... [USER]

Example:

id id username

In this example, running id without any arguments will provide the user and group information for the currently logged-in user, while running id username will provide the information for the specified user.


id command Linux id command user information group information UID GID Linux commands