A lightweight Linux command-line utility written in C that displays all the groups a user belongs to β clean, simple, and free.
Hello there!
Iβm Amith E.K., a passionate beginner exploring the world of Free and Open Source Software (FOSS).
This project β getgroups β is my small contribution to that world.
I deeply respect the vision of Richard Stallman, who started the Free Software movement, and Linus Torvalds, who gave us the Linux kernel β both of whom have inspired generations of developers, including me.
Iβm still new to publishing and committing projects to the open-source world, but I believe that every contribution, no matter how small, makes a difference.
Iβll keep working hard to help make the free and open-source world beautiful, inclusive, and powerful. πͺ
Letβs continue the deep ideas set by Richard Stallman and keep the spirit of freedom alive in technology.
Letβs make the free and open-source world great again!
This project follows the true spirit of FOSS:
"You are free to use, study, modify, and share this software with everyone."
Anyone is welcome to:
- β Use this code
- π§ Modify it
- π Redistribute it
- π€ Improve it
...under the terms of the GNU General Public License (GPL v3).
Together, letβs build a world where software is truly free β as in freedom.
The getgroups command is a simple C program that:
- Detects the current user (or takes another username as input).
- Uses the system call
getgrouplist()to retrieve all groups that user belongs to. - Displays both the group names and their corresponding Group IDs (GIDs).
- Works seamlessly across all major Linux distributions.
Itβs a lightweight, educational utility that helps you understand how Linux handles user-group mapping at the system level.
To compile from source, run:
gcc getgroups.c -o getgroups
./getgroups
./getgroups root
sudo mv getgoups /usr/bin #to make it systemwide
getgroups rootThis project is licensed under the GNU General Public License version 3 (GPLv3).
| Freedom | Description |
|---|---|
| π― Use | Use this software for any purpose - personal, educational, or commercial |
| π Study | Examine the source code to understand how it works |
| β‘ Modify | Adapt and change the software to meet your needs |
| π€ Share | Distribute original or modified versions to others |
- Same License: Any redistribution must remain under GPLv3
- License Preservation: Include this license information with all copies
- Source Availability: Provide access to source code for derivatives
- Freedom Protection: Ensure software and derivatives remain free for everyone
"I chose GPLv3 because it aligns with my belief in software freedom."
This license ensures that:
- π‘οΈ Software remains open and accessible to all
- π€ Contributors share improvements back to the community
- π The principles of software freedom continue to guide new generations
"Free software is a matter of liberty, not price."
β Richard Stallman
| Contributor | Impact |
|---|---|
| Richard Stallman | For starting the Free Software Foundation and defining the philosophy of software freedom |
| Linus Torvalds | For creating Linux and demonstrating how collaboration can change the world |
| Every FOSS Developer | For believing in sharing knowledge freely and building a better digital future |
Amith E.K.
Beginner in Free and Open Source Contribution
"Working hard to make the FOSS world beautiful."
Feel free to share feedback, suggestions, or improvements!
Let's continue spreading the freedom that makes open-source special.
For the complete license terms, see the LICENSE file.
"Software freedom is the foundation of a free society."