• Home
  • LLMs
  • Docker
  • Kubernetes
  • Java
  • All
  • About
Linux-Ubuntu | Groups
  1. References
  2. List the groups of the current process (groups)
  3. Add a new group (groupadd)
  4. Delete a group (groupdel)

  1. References
    See this page for more details about group management:
    https://help.ubuntu.com/lts/serverguide/user-management.html
  2. List the groups of the current process (groups)
    • Print groups for the current process:
      $ groups
      mtitek group1 group2

    • You can print the groups of a specific users:
      $ groups mtitek mtitek1
      mtitek : mtitek group1 group2
      mtitek1 : mtitek1
  3. Add a new group (groupadd)
    Use the groupadd command to add a new group (man groupadd):
    Usage: groupadd [options] GROUP
    
    Options:
      -f, --force  exit successfully if the group already exists

    Examples:
    • Create a group named "newgroup".
      $ sudo groupadd newgroup
      
      $ cat /etc/group | grep newgroup
      newgroup:x:1005:
  4. Delete a group (groupdel)
    Examples:
    • Delete the group "newgroup":
      $ sudo groupdel newgroup
© 2025  mtitek