How to get current user's UID on Linux
Run
id -u
to get the current user’s UID. Example:
$ id -u
1000
You can also get another user’s UID:
$ id -u root
0
Run
id -u
to get the current user’s UID. Example:
$ id -u
1000
You can also get another user’s UID:
$ id -u root
0