Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the use of Linux's id command

Shulou Source: shulou.com Published: 2022-06-01 18:37:09 10月01日 Update

Today, I would like to share with you the relevant knowledge about the use of Linux's id command. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.

The Linux common command id command is used to display the ID of the user, and the ID,id of the group to which the user belongs displays the actual and valid ID of the user and the group to which he belongs. If the two ID are the same, only the actual ID is displayed. If you specify only the user name, the ID of the current user is displayed.

Syntax id [- gGnru] [--help] [--version] [user name] parameter description:

-g or-group displays the ID of the group to which the user belongs.

-G or-groups displays the ID of the additional group to which the user belongs.

-n or-name displays the name of the user, the group to which he belongs, or the additional group.

-r or-real displays the actual ID.

-u or-user displays the user ID.

-help displays help.

-version displays version information.

Instance displays current user information

# id / / displays the 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 displays the ID of the user group

# id-g 0 displays the ID of all groups

# id-g 0 1 2 3 4 5 6 10 is all the content of this article "what is the use of Linux's id command". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: User ownership command knowledge article name actual information content additional different great valid same two parameters most examples that is commonly used Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno NVidia Shulou Information Microsoft macOS