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
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow