{
    "mode": "man",
    "parameter": "CGCREATE",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/CGCREATE/json",
    "generated": "2026-11-10T05:58:02Z",
    "synopsis": "cgcreate  [-h]  [-t  <tuid>:<tgid>] [-a <agid>:<auid>] [-f mode] [-d mode] [-s mode] -g <con‐\ntrollers>:<path> [-g ...]",
    "sections": {
        "NAME": {
            "content": "cgcreate - create new cgroup(s)\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "cgcreate  [-h]  [-t  <tuid>:<tgid>] [-a <agid>:<auid>] [-f mode] [-d mode] [-s mode] -g <con‐\ntrollers>:<path> [-g ...]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The command creates new cgroup(s) defined by the options -g.\n\n",
            "subsections": [
                {
                    "name": "-a <agid>:<auid>",
                    "content": "defines the name of the user and the group which own the rest of the  defined  control\ngroup’s  files.  These  users  are allowed to set subsystem parameters and create sub‐\ngroups.  The default value is the same as has the parent cgroup.\n\n",
                    "flag": "-a"
                },
                {
                    "name": "-d, --dperm=mode",
                    "content": "sets the permissions of a control groups directory.  The permissions needs to be spec‐\nified as octal numbers e.g.  -d 775.\n\n",
                    "flag": "-d",
                    "long": "--dperm",
                    "arg": "mode"
                },
                {
                    "name": "-f, --fperm=mode",
                    "content": "sets the permissions of the control groups parameters.  The permissions  needs  to  be\nspecified  as  octal numbers e.g.  -f 775.  The value is not used as given because the\ncurrent owner's permissions are used as an umask (so 777 will  set  group  and  others\npermissions to the owners permissions).\n\n",
                    "flag": "-f",
                    "long": "--fperm",
                    "arg": "mode"
                },
                {
                    "name": "-g <controllers>:<path>",
                    "content": "defines  control  groups to be added.  controllers is a list of controllers. Character\n\"*\" can be used as a shortcut for \"all mounted controllers\".   path  is  the  relative\npath  to  control  groups  in the given controllers list. This option can be specified\nmultiple times.\n\n",
                    "flag": "-g"
                },
                {
                    "name": "-h, --help",
                    "content": "display this help and exit\n\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-s, --tperm=mode",
                    "content": "sets the permissions of the control group tasks file.  The  permissions  needs  to  be\nspecified  as  octal numbers e.g.  -s 775.  The value is not used as given because the\ncurrent owner's permissions are used as an umask (so 777 will  set  group  and  others\npermissions to the owners permissions).\n\n",
                    "flag": "-s",
                    "long": "--tperm",
                    "arg": "mode"
                },
                {
                    "name": "-t <tuid>:<tgid>",
                    "content": "defines  the name of the user and the group, which owns tasks file of the defined con‐\ntrol group. I.e. this user and members of this group have write access  to  the  file.\nThe default value is the same as has the parent cgroup.\n\n",
                    "flag": "-t"
                }
            ]
        },
        "ENVIRONMENT VARIABLES": {
            "content": "CGROUPLOGLEVEL\ncontrols verbosity of the tool. Allowed values are DEBUG, INFO, WARNING or ERROR.\n\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "cgcreate -g *:student devices:teacher\ncreate  control  group  student  in  all  mounted hierarchies and create control group\nteacher in hierarchy containing controller devices.\n\n\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "cgrules.conf (5) cgexec (1) cgclassify (1)\n\nLinux                                        2009-03-15                                  CGCREATE(1)",
            "subsections": []
        }
    },
    "summary": "cgcreate - create new cgroup(s)",
    "flags": [
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": "defines the name of the user and the group which own the rest of the defined control group’s files. These users are allowed to set subsystem parameters and create sub‐ groups. The default value is the same as has the parent cgroup."
        },
        {
            "flag": "-d",
            "long": "--dperm",
            "arg": "mode",
            "description": "sets the permissions of a control groups directory. The permissions needs to be spec‐ ified as octal numbers e.g. -d 775."
        },
        {
            "flag": "-f",
            "long": "--fperm",
            "arg": "mode",
            "description": "sets the permissions of the control groups parameters. The permissions needs to be specified as octal numbers e.g. -f 775. The value is not used as given because the current owner's permissions are used as an umask (so 777 will set group and others permissions to the owners permissions)."
        },
        {
            "flag": "-g",
            "long": null,
            "arg": null,
            "description": "defines control groups to be added. controllers is a list of controllers. Character \"*\" can be used as a shortcut for \"all mounted controllers\". path is the relative path to control groups in the given controllers list. This option can be specified multiple times."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "display this help and exit"
        },
        {
            "flag": "-s",
            "long": "--tperm",
            "arg": "mode",
            "description": "sets the permissions of the control group tasks file. The permissions needs to be specified as octal numbers e.g. -s 775. The value is not used as given because the current owner's permissions are used as an umask (so 777 will set group and others permissions to the owners permissions)."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "defines the name of the user and the group, which owns tasks file of the defined con‐ trol group. I.e. this user and members of this group have write access to the file. The default value is the same as has the parent cgroup."
        }
    ],
    "examples": [
        "cgcreate -g *:student devices:teacher",
        "create  control  group  student  in  all  mounted hierarchies and create control group",
        "teacher in hierarchy containing controller devices."
    ],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Create cgroups, used to limit, measure, and control resources used by processes.",
        "examples": [
            {
                "description": "Create a new [g]roup",
                "command": "cgcreate -g {{group_type}}:{{group_name}}"
            },
            {
                "description": "Create a new [g]roup with multiple cgroup types",
                "command": "cgcreate -g {{group_type1}},{{group_type2}}:{{group_name}}"
            },
            {
                "description": "Create a subgroup",
                "command": "mkdir /sys/fs/cgroup/{{group_type}}/{{group_name}}/{{subgroup_name}}"
            }
        ]
    }
}