Latest web development tutorials

Linux id Command

Linux command Daquan Linux command Daquan

User ID, and belongs to a group ID Linux id command displays.

id will be displayed and the user belongs to the group of real and effective ID. If two same ID, only the actual ID. If you specify only the user name, the command displays the current user's ID.

grammar

id [-gGnru][--help][--version][用户名称]

Parameter Description:

  • -g or --group display the user belongs to the group ID.
  • -G Or --groups display additional user belongs to the group ID.
  • -n or --name display name for the user, group, or belongs to an additional group.
  • -r or --real show the actual ID.
  • -u or --user show user ID.
  • -help Display help.
  • -version Display version information.

Examples

Displays the current user information

# id //显示当前用户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

Displays the user group ID

# id -g
0

Show all the group ID

# id -g
0 1 2 3 4 5 6 10

Displays the user information

# id hnlinux

Linux command Daquan Linux command Daquan