ID Command in Linux

In Linux, the id command helps you uncover both user and group names, along with their corresponding numeric IDs, UID and group ID. You can use this command to extract your user details, specific user’s UID, user’s UID and groups, user’s group list and your security context.

ID command Examples:

How to print your own id:

Open the terminal (ctrl+alt+t) application and run below command.

id

id command

How to find specific users id:

Example: To find my (username:manikandan) UID, run below command.

id -u manikandan

id -u

How to find specific users GID:

id -g manikandan

id -g

How to find all the groups a user belongs to:

id -G manikandan

id -G command

For the complete usage details, run below commands.

man id
id --help
If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.



Also Read:  How to Auto Click Mouse and Key using Clicker App

Leave a Reply