Linux: Get own User-ID / UID / GID
Question by Guest | Last update on 2021-04-07 | Created on 2017-09-28
How can I retrieve my own User-ID on Linux? Is it displayed somewhere? Where can I find it?
Is there perhaps some command for the Terminal available, which will show my own User-ID (UID) and my Group-ID (GID) as well?
Related Topics
Debian: The package is of bad quality: wrong-file-owner-uid-or-gid
Question | 1 Answer
Release of Debian Packages, RPM Packages and Binaries for Linux
Blog | 0 Comments
Linux: Mark Program File as executable
Tutorial | 0 Comments
Delphi/Lazarus: Is the ALT, SHIFT or CTRL key pressed?
Tutorial | 0 Comments
Lazarus: Detect Operating System (Compiler Switch)
Tutorial | 0 Comments
Linux: Mount Folder using own Name and Rights (not Root)
Question | 1 Answer
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
You can just use the command "id" in the Terminal to display this information.
The output will be something like that:
In this case, the UID of the user "uname" is 1000, the GID of "uname" is 2000.
If you only want to display the UID or the GID of a specific user, you can use the commands "id -u <username>" and "id -g <username>". For example:
The first command only shows the UID, the second only the GID.
Last update on 2021-04-07 | Created on 2017-09-29