{
    "mode": "man",
    "parameter": "a2enmod",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/a2enmod/8/json",
    "generated": "2026-05-30T07:08:39Z",
    "synopsis": "a2enmod [-q|--quiet] [-m|--maintmode] [ module ]\na2dismod [-q|--quiet] [-f|--force] [-m|--maintmode] [-p|--purge] [ module ]",
    "sections": {
        "NAME": {
            "content": "a2enmod, a2dismod - enable or disable an apache2 module\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "a2enmod [-q|--quiet] [-m|--maintmode] [ module ]\n\na2dismod [-q|--quiet] [-f|--force] [-m|--maintmode] [-p|--purge] [ module ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This manual page documents briefly the a2enmod and a2dismod commands.\n\na2enmod  is  a script that enables the specified module within the apache2 configuration.  It\ndoes this by creating symlinks within /etc/apache2/mods-enabled.  Likewise, a2dismod disables\na  module by removing those symlinks.  It is not an error to enable a module which is already\nenabled, or to disable one which is already disabled.\n\nNote that many modules have, in addition to a .load file, an associated .conf file.  Enabling\nthe  module  puts  the configuration directives in the .conf file as directives into the main\nserver context of apache2.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-q, --quiet",
                    "content": "Don't show informative messages.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-f, --force",
                    "content": "When disabling a module, also cascade disables all modules that depends on it.\n",
                    "flag": "-f",
                    "long": "--force"
                },
                {
                    "name": "-m, --maintmode",
                    "content": "Enables the maintainer mode, that is the program invocation is  effectuated  automati‐\ncally by a maintainer script. This switch should not be used by end users.\n",
                    "flag": "-m",
                    "long": "--maintmode"
                },
                {
                    "name": "-p, --purge",
                    "content": "When  disabling  a  module,  purge all traces of the module in the internal state data\nbase.\n",
                    "flag": "-p",
                    "long": "--purge"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "a2enmod and a2dismod exit with status 0 if all modules are processed successfully, 1  if  er‐\nrors occur, 2 if an invalid option was used.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "a2enmod imagemap\na2dismod mimemagic\n\nEnables the modimagemap module, and disables the modmimemagic module.\n",
            "subsections": []
        },
        "FILES": {
            "content": "",
            "subsections": [
                {
                    "name": "/etc/apache2/mods-available",
                    "content": "Directory with files giving information on available modules.\n"
                },
                {
                    "name": "/etc/apache2/mods-enabled",
                    "content": "Directory with links to the files in mods-available for enabled modules.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "apache2ctl(8), a2enconf(8), a2disconf(8), a2ensite(8), a2dissite(8).\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This manual page was written by Daniel Stone <daniel@sfarc.net> for the Debian GNU/Linux dis‐\ntribution, as it is a Debian-specific script with the package.\n\n\n\n12 October 2006                                A2ENMOD(8)",
            "subsections": []
        }
    },
    "summary": "a2enmod, a2dismod - enable or disable an apache2 module",
    "flags": [
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Don't show informative messages."
        },
        {
            "flag": "-f",
            "long": "--force",
            "arg": null,
            "description": "When disabling a module, also cascade disables all modules that depends on it."
        },
        {
            "flag": "-m",
            "long": "--maintmode",
            "arg": null,
            "description": "Enables the maintainer mode, that is the program invocation is effectuated automati‐ cally by a maintainer script. This switch should not be used by end users."
        },
        {
            "flag": "-p",
            "long": "--purge",
            "arg": null,
            "description": "When disabling a module, purge all traces of the module in the internal state data base."
        }
    ],
    "examples": [
        "a2enmod imagemap",
        "a2dismod mimemagic",
        "Enables the modimagemap module, and disables the modmimemagic module."
    ],
    "see_also": [
        {
            "name": "apache2ctl",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/apache2ctl/8/json"
        },
        {
            "name": "a2enconf",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/a2enconf/8/json"
        },
        {
            "name": "a2disconf",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/a2disconf/8/json"
        },
        {
            "name": "a2ensite",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/a2ensite/8/json"
        },
        {
            "name": "a2dissite",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/a2dissite/8/json"
        }
    ]
}