The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

id id' - Display User ID Information




The 'id' command (print real and effective user and group IDs) conveniently displays user information such as UID, GID, and login name.

The syntax for 'id' is: id [OPTIONS] [USERNAME],

Commonly used options include:
Here are a few examples of using the id command:
$ id anges -Gn ←Display the groups that the user "anges" belongs to (equivalent to the "groups" command)
anges lib lab office
$ id ←display information about the currently logged-in user

Keep in mind that the id command provides important identity information about users and groups on the system, which can be useful for checking permissions and troubleshooting issues related to user and group access.

For more examples and option usages, please refer to the provided link.