YouTip LogoYouTip

Linux Comm Id

# Linux id Command [![Image 3: Linux Command Manual](#) Linux Command Manual](#) The Linux `id` command is used to display a user's ID and the ID of the groups they belong to. `id` displays the actual and effective IDs of the user and their groups. If the two IDs are the same, only the actual ID is displayed. If only a username is specified, it displays the current user's ID. This command displays the user's UID (User ID), GID (Group ID), and all group IDs the user belongs to. ### Syntax id **Parameter Description**: * `-g` or `--group` Displays the ID of the user's group. * `-G` or `--groups` Displays the IDs of the user's supplementary groups. * `-n` or `--name` Displays the name of the user, group, or supplementary group. * `-r` or `--real` Displays the real ID. * `-u` or `--user` Displays the user ID. * `--help` Displays help information. * `--version` Displays version information. ### Examples Display current user information: # id //Display current user ID uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=root:system_r:unconfined_t Display the user's group ID: # id -g0 Display all group IDs: # id -G0 1 2 3 4 5 6 10 Display information for a specified user: # id hnlinux [![Image 4: Linux Command Manual](#) Linux Command Manual](#)
← Linux Comm FreeLinux Comm W β†’