Get User ID (UID) in Linux

Get User ID (UID) in Linux

In Linux system, each user is identified by unique identifier known as user ID or UID. It is used to determine which system resources the user can access. This tutorial shows how to get user ID (UID) in Linux.

In order to get UID of a current user, run the id command with -u option:

id -u

Output example:

1000

Provide username as argument to get UID of a specific user:

id -u james

Leave a Comment

Cancel reply

Your email address will not be published.