How to get current user's primary group GID on Linux
Run
id -g
to get the GID of the current user’s primary group. Example:
$ id -g
1000
You can also get the GID of another user’s primary group:
$ id -g 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