{
    "content": [
        {
            "type": "text",
            "text": "# aa-exec(1) (man)\n\n**Summary:** aa-exec - confine a program with the specified AppArmor profile\n\n**Synopsis:** aa-exec [options] [--] [<command> ...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -i | --immediate | — | transition to PROFILE before doing executing <command>. This subjects the running of <command> to the exec transition ru |\n| -v | --verbose | — | show commands being performed |\n| -d | --debug | — | show commands and error codes -- Signal the end of options and disables further option processing. Any arguments after t |\n\n## See Also\n\n- aa-stack(8)\n- aa-namespace(8)\n- apparmor(7)\n- apparmor.d(5)\n- aachangeprofile(3)\n- aachangeonexec(3)\n- AA-EXEC(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (10 lines) — 4 subsections\n  - OPTIONS aa-exec accepts the following arguments: (8 lines)\n  - -i, --immediate (3 lines)\n  - -v, --verbose (2 lines)\n  - -d, --debug (6 lines)\n- **BUGS** (2 lines)\n- **SEE ALSO** (6 lines)\n\n## Full Content\n\n### NAME\n\naa-exec - confine a program with the specified AppArmor profile\n\n### SYNOPSIS\n\naa-exec [options] [--] [<command> ...]\n\n### DESCRIPTION\n\naa-exec is used to launch a program confined by the specified profile and or namespace.  If\nboth a profile and namespace are specified command will be confined by profile in the new\npolicy namespace.  If only a namespace is specified, the profile name of the current\nconfinement will be used.  If neither a profile or namespace is specified command will be run\nusing standard profile attachment (ie. as if run without the aa-exec command).\n\nIf the arguments are to be pasted to the <command> being invoked by aa-exec then -- should be\nused to separate aa-exec arguments from the command.\naa-exec -p profile1 -- ls -l\n\n#### OPTIONS aa-exec accepts the following arguments:\n\n-p PROFILE, --profile=PROFILE\nconfine <command> with PROFILE. If the PROFILE is not specified use the current profile\nname (likely unconfined).\n\n-n NAMESPACE, --namespace=NAMESPACE\nuse profiles in NAMESPACE.  This will result in confinement transitioning to using the\nnew profile namespace.\n\n#### -i, --immediate\n\ntransition to PROFILE before doing executing <command>.  This subjects the running of\n<command> to the exec transition rules of the current profile.\n\n#### -v, --verbose\n\nshow commands being performed\n\n#### -d, --debug\n\nshow commands and error codes\n\n--  Signal the end of options and disables further option processing. Any arguments after the\n-- are treated as arguments of the command.  This is useful when passing arguments to the\n<command> being invoked by aa-exec.\n\n### BUGS\n\nIf you find any bugs, please report them at <https://gitlab.com/apparmor/apparmor/-/issues>\n\n### SEE ALSO\n\naa-stack(8), aa-namespace(8), apparmor(7), apparmor.d(5), aachangeprofile(3),\naachangeonexec(3) and <https://wiki.apparmor.net>.\n\n\n\nAppArmor 3.0.4                               2025-08-15                                   AA-EXEC(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "aa-exec",
        "section": "1",
        "mode": "man",
        "summary": "aa-exec - confine a program with the specified AppArmor profile",
        "synopsis": "aa-exec [options] [--] [<command> ...]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-i",
                "long": "--immediate",
                "arg": null,
                "description": "transition to PROFILE before doing executing <command>. This subjects the running of <command> to the exec transition rules of the current profile."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "show commands being performed"
            },
            {
                "flag": "-d",
                "long": "--debug",
                "arg": null,
                "description": "show commands and error codes -- Signal the end of options and disables further option processing. Any arguments after the -- are treated as arguments of the command. This is useful when passing arguments to the <command> being invoked by aa-exec."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "aa-stack",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/aa-stack/8/json"
            },
            {
                "name": "aa-namespace",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/aa-namespace/8/json"
            },
            {
                "name": "apparmor",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/apparmor/7/json"
            },
            {
                "name": "apparmor.d",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/apparmor.d/5/json"
            },
            {
                "name": "aachangeprofile",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/aachangeprofile/3/json"
            },
            {
                "name": "aachangeonexec",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/aachangeonexec/3/json"
            },
            {
                "name": "AA-EXEC",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/AA-EXEC/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": [
                    {
                        "name": "OPTIONS aa-exec accepts the following arguments:",
                        "lines": 8
                    },
                    {
                        "name": "-i, --immediate",
                        "lines": 3,
                        "flag": "-i",
                        "long": "--immediate"
                    },
                    {
                        "name": "-v, --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-d, --debug",
                        "lines": 6,
                        "flag": "-d",
                        "long": "--debug"
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}