{
    "content": [
        {
            "type": "text",
            "text": "# ifdown(8) (man)\n\n**Summary:** ifup - bring a network interface up  ifdown - take a network interface down  ifquery - parse interface configuration\n\n**Synopsis:** ifup  [-nv]  [--no-act]  [--verbose]  [-i  FILE|--interfaces=FILE] [--state-dir=DIR] [--allow\nCLASS] -a|IFACE...\nifup -h|--help\nifup -V|--version\nifdown [-nv] [--no-act] [--verbose] [-i  FILE|--interfaces=FILE]  [--state-dir=DIR]  [--allow\nCLASS] -a|IFACE...\nifquery  [-nv]  [--verbose]  [-i  FILE|--interfaces=FILE]  [--state-dir=DIR]  [--allow CLASS]\nIFACE...\nifquery -l|--list [-nv] [--verbose] [-i  FILE|--interfaces=FILE]  [--state-dir=DIR]  [--allow\nCLASS] [-a|IFACE...]\nifquery --state [--state-dir=DIR] [--allow CLASS] [-a|IFACE...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -a | --all | — | If given to ifup, affect all interfaces marked auto. Interfaces are brought up in the order in which they are defined in |\n| — | --force | — | Force configuration or deconfiguration of the interface. |\n| — | --ignore-errors | — | If any of the commands of scripts fails, continue. |\n| -h | --help | — | Show summary of options. --allow=CLASS Only allow interfaces listed in an allow-CLASS line in /etc/network/interfaces to |\n| -i | — | — | Read interface definitions from FILE instead of from /etc/network/interfaces. --state-dir=DIR Keep interface state in DI |\n| -X | — | — | Exclude interfaces from the list of interfaces to operate on by the PATTERN. PATTERN uses a usual shell glob syntax. If  |\n| -o | — | — | Set OPTION to VALUE as though it were in /etc/network/interfaces. |\n| -n | --no-act | — | Don't configure any interfaces or run any \"up\" or \"down\" commands. |\n| — | --no-mappings | — | Don't run any mappings. See interfaces(5) for more information about the mapping fea‐ ture. |\n| — | --no-scripts | — | Don't run any scripts under /etc/network/if-*.d/ |\n| — | --no-loopback | — | Disable special handling of the loopback interface. By default, the loopback interface (lo on Linux) is predefined inter |\n| -V | --version | — | Show copyright and version information. |\n| -v | --verbose | — | Show commands as they are executed. |\n| -l | --list | — | For ifquery, list all the interfaces which match the specified class. If no class specified, prints all the interfaces l |\n| — | --state | — | For ifquery, dump the state of the interfaces. When no interfaces specified, lists all interfaces brought up together wi |\n\n## Examples\n\n- `Bring up all the interfaces defined with auto in /etc/network/interfaces`\n- `Bring up interface eth0`\n- `Bring up interface eth0 as logical interface home`\n- `Bring down all interfaces that are currently up.`\n- `Print names of all interfaces specified with the auto keyword.`\n- `Print names of all interfaces specified with the allow-hotplug keyword.`\n- `Display  the  interface  options as specified in the ifupdown configuration. Each key-`\n- `value pair is printed out on individual line using \": \" as separator.`\n\n## See Also\n\n- interfaces(5)\n- ip(8)\n- ifconfig(8)\n\n## Section Outline\n\n- **NAME** (6 lines)\n- **SYNOPSIS** (16 lines)\n- **DESCRIPTION** (4 lines)\n- **OPTIONS** (2 lines) — 15 subsections\n  - -a --all (7 lines)\n  - --force (2 lines)\n  - --ignore-errors (2 lines)\n  - -h --help (6 lines)\n  - -i --interfaces= (5 lines)\n  - -X --exclude= (5 lines)\n  - -o (2 lines)\n  - -n --no-act (2 lines)\n  - --no-mappings (3 lines)\n  - --no-scripts (2 lines)\n  - --no-loopback (7 lines)\n  - -V --version (2 lines)\n  - -v --verbose (2 lines)\n  - -l --list (3 lines)\n  - --state (6 lines)\n- **EXAMPLES** (1 lines) — 7 subsections\n  - ifup -a (2 lines)\n  - ifup eth0 (2 lines)\n  - ifup eth0=home (2 lines)\n  - ifdown -a (2 lines)\n  - ifquery -l (2 lines)\n  - ifquery -l --allow=hotplug (2 lines)\n  - ifquery eth0 (3 lines)\n- **NOTES** (10 lines)\n- **FILES** (6 lines)\n- **CONCURRENCY** (4 lines)\n- **EXIT STATUS** (10 lines)\n- **KNOWN BUGS/LIMITATIONS** (18 lines)\n- **AUTHORS** (6 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nifup - bring a network interface up\n\nifdown - take a network interface down\n\nifquery - parse interface configuration\n\n### SYNOPSIS\n\nifup  [-nv]  [--no-act]  [--verbose]  [-i  FILE|--interfaces=FILE] [--state-dir=DIR] [--allow\nCLASS] -a|IFACE...\nifup -h|--help\nifup -V|--version\n\nifdown [-nv] [--no-act] [--verbose] [-i  FILE|--interfaces=FILE]  [--state-dir=DIR]  [--allow\nCLASS] -a|IFACE...\n\nifquery  [-nv]  [--verbose]  [-i  FILE|--interfaces=FILE]  [--state-dir=DIR]  [--allow CLASS]\nIFACE...\n\nifquery -l|--list [-nv] [--verbose] [-i  FILE|--interfaces=FILE]  [--state-dir=DIR]  [--allow\nCLASS] [-a|IFACE...]\n\nifquery --state [--state-dir=DIR] [--allow CLASS] [-a|IFACE...]\n\n### DESCRIPTION\n\nThe ifup and ifdown commands may be used to configure (or, respectively, deconfigure) network\ninterfaces based on interface definitions in the file /etc/network/interfaces.  ifquery  com‐\nmand may be used to parse interfaces configuration.\n\n### OPTIONS\n\nA summary of options is included below.\n\n#### -a --all\n\nIf given to ifup, affect all interfaces marked auto.  Interfaces are brought up in the\norder in which they are defined in /etc/network/interfaces.   Combined  with  --allow,\nacts  on  all interfaces of a specified class instead.  If given to ifdown, affect all\ndefined interfaces.  Interfaces are brought down in the order in which they  are  cur‐\nrently  listed  in  the state file. Only interfaces defined in /etc/network/interfaces\nwill be brought down.\n\n#### --force\n\nForce configuration or deconfiguration of the interface.\n\n#### --ignore-errors\n\nIf any of the commands of scripts fails, continue.\n\n#### -h --help\n\nShow summary of options.\n\n--allow=CLASS\nOnly allow interfaces listed in an allow-CLASS line in /etc/network/interfaces  to  be\nacted upon.\n\n#### -i --interfaces=\n\nRead interface definitions from FILE instead of from /etc/network/interfaces.\n\n--state-dir=DIR\nKeep interface state in DIR instead of in /run/network.\n\n#### -X --exclude=\n\nExclude  interfaces from the list of interfaces to operate on by the PATTERN.  PATTERN\nuses a usual shell glob syntax. If shell wildcards are not used, it must match the ex‐\nact interface name. This option may be specified multiple times resulting in more than\none pattern being excluded.\n\n#### -o\n\nSet OPTION to VALUE as though it were in /etc/network/interfaces.\n\n#### -n --no-act\n\nDon't configure any interfaces or run any \"up\" or \"down\" commands.\n\n#### --no-mappings\n\nDon't run any mappings.  See interfaces(5) for more information about the mapping fea‐\nture.\n\n#### --no-scripts\n\nDon't run any scripts under /etc/network/if-*.d/\n\n#### --no-loopback\n\nDisable special handling of the loopback interface. By default, the loopback interface\n(lo on Linux) is predefined internally as an auto interface, so  it's  brought  up  on\nifup  -a  automatically. In the case the loopback device is redefined by user, the in‐\nterface is configured just once anyway. If, however, another interface is also defined\nas loopback, it's configured as usual. Specifying this option disables this behaviour,\nso the loopback interface won't be configured automatically.\n\n#### -V --version\n\nShow copyright and version information.\n\n#### -v --verbose\n\nShow commands as they are executed.\n\n#### -l --list\n\nFor ifquery, list all the interfaces which match the specified  class.   If  no  class\nspecified, prints all the interfaces listed as auto.\n\n#### --state\n\nFor ifquery, dump the state of the interfaces. When no interfaces specified, lists all\ninterfaces brought up together with logical interfaces assigned to them and exits with\na  status  code indicating success. If one or more interfaces specified, display state\nof these interfaces only; successful code is returned if all of  interfaces  given  as\narguments are up. Otherwise, 0 is returned.\n\n### EXAMPLES\n\n#### ifup -a\n\nBring up all the interfaces defined with auto in /etc/network/interfaces\n\n#### ifup eth0\n\nBring up interface eth0\n\n#### ifup eth0=home\n\nBring up interface eth0 as logical interface home\n\n#### ifdown -a\n\nBring down all interfaces that are currently up.\n\n#### ifquery -l\n\nPrint names of all interfaces specified with the auto keyword.\n\n#### ifquery -l --allow=hotplug\n\nPrint names of all interfaces specified with the allow-hotplug keyword.\n\n#### ifquery eth0\n\nDisplay  the  interface  options as specified in the ifupdown configuration. Each key-\nvalue pair is printed out on individual line using \": \" as separator.\n\n### NOTES\n\nifup, ifdown, and ifquery are actually the same program called by different names.\n\nThe program does not configure network interfaces directly; it runs low level utilities  such\nas ip to do its dirty work.\n\nWhen invoked, ifdown checks if ifup is still running. In that case, SIGTERM is sent to ifup.\n\nDuring  interface  deconfiguration,  ifdown ignores errors the same way as if --ignore-errors\nwas specified.\n\n### FILES\n\n/etc/network/interfaces\ndefinitions of network interfaces See interfaces(5) for more information.\n\n/run/network/ifstate\ncurrent state of network interfaces\n\n### CONCURRENCY\n\nIfupdown uses per-interface locking to ensure that concurrent ifup and ifdown  calls  to  the\nsame interface are run in serial.  However, calls to different interfaces will be able to run\nin parallel.\n\n### EXIT STATUS\n\nFor ifup and ifdown, the exit status will be 0  if  the  given  interface(s)  have  all  been\n(de)configured successfully, 1 if there was any error.  The result of these commands is idem‐\npotent; running ifup on an interface that is already up will result in an exit status  of  0,\nand  similarly running ifdown on an interface that is not up will also result in an exit sta‐\ntus of 0.\n\nifquery will normally return with exit status 0 if an interface with a matching iface stanza,\n1 if there is no matching stanza.  ifquery --state will also return with exit status 1 if the\ngiven interface was known but was not up.\n\n### KNOWN BUGS/LIMITATIONS\n\nThe program keeps records of whether network interfaces are up or  down.   Under  exceptional\ncircumstances  these  records can become inconsistent with the real states of the interfaces.\nFor example, an interface that was brought up using ifup and later deconfigured using  ifcon‐‐\nfig  will  still be recorded as up.  To fix this you can use the --force option to force ifup\nor ifdown to run configuration or deconfiguration commands despite what it considers the cur‐\nrent state of the interface to be.\n\nThe  file /run/network/ifstate must be writable for ifup or ifdown to work properly.  If that\nlocation is not writable (for example, because the root filesystem is mounted  read-only  for\nsystem recovery) then /run/network/ifstate should be made a symbolic link to a writable loca‐\ntion.  If that is not possible then you can use the --force option to  run  configuration  or\ndeconfiguration commands without updating the file.\n\nNote  that  the  program  does not run automatically: ifup alone does not bring up interfaces\nthat appear as a result of hardware being installed and ifdown alone does not bring down  in‐\nterfaces that disappear as a result of hardware being removed.  To automate the configuration\nof network interfaces you need to install other packages such as udev(7) or ifplugd(8).\n\n### AUTHORS\n\nThe ifupdown suite was created by Anthony  Towns  <aj@azure.humbug.org.au>,  currently  main‐\ntained by Santiago Ruano Rincón <santiago@debian.org> and Josue Ortega <josue@debian.org>\n\nMany others have helped develop ifupdown over time, see /usr/share/doc/ifupdown/changelog.De‐\nbian.gz for a full history.\n\n### SEE ALSO\n\ninterfaces(5), ip(8), ifconfig(8).\n\n\n\nIFUPDOWN                                     11 Jan 2017                                     ifup(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "ifdown",
        "section": "8",
        "mode": "man",
        "summary": "ifup - bring a network interface up  ifdown - take a network interface down  ifquery - parse interface configuration",
        "synopsis": "ifup  [-nv]  [--no-act]  [--verbose]  [-i  FILE|--interfaces=FILE] [--state-dir=DIR] [--allow\nCLASS] -a|IFACE...\nifup -h|--help\nifup -V|--version\nifdown [-nv] [--no-act] [--verbose] [-i  FILE|--interfaces=FILE]  [--state-dir=DIR]  [--allow\nCLASS] -a|IFACE...\nifquery  [-nv]  [--verbose]  [-i  FILE|--interfaces=FILE]  [--state-dir=DIR]  [--allow CLASS]\nIFACE...\nifquery -l|--list [-nv] [--verbose] [-i  FILE|--interfaces=FILE]  [--state-dir=DIR]  [--allow\nCLASS] [-a|IFACE...]\nifquery --state [--state-dir=DIR] [--allow CLASS] [-a|IFACE...]",
        "flags": [
            {
                "flag": "-a",
                "long": "--all",
                "arg": null,
                "description": "If given to ifup, affect all interfaces marked auto. Interfaces are brought up in the order in which they are defined in /etc/network/interfaces. Combined with --allow, acts on all interfaces of a specified class instead. If given to ifdown, affect all defined interfaces. Interfaces are brought down in the order in which they are cur‐ rently listed in the state file. Only interfaces defined in /etc/network/interfaces will be brought down."
            },
            {
                "flag": "",
                "long": "--force",
                "arg": null,
                "description": "Force configuration or deconfiguration of the interface."
            },
            {
                "flag": "",
                "long": "--ignore-errors",
                "arg": null,
                "description": "If any of the commands of scripts fails, continue."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Show summary of options. --allow=CLASS Only allow interfaces listed in an allow-CLASS line in /etc/network/interfaces to be acted upon."
            },
            {
                "flag": "-i",
                "long": null,
                "arg": null,
                "description": "Read interface definitions from FILE instead of from /etc/network/interfaces. --state-dir=DIR Keep interface state in DIR instead of in /run/network."
            },
            {
                "flag": "-X",
                "long": null,
                "arg": null,
                "description": "Exclude interfaces from the list of interfaces to operate on by the PATTERN. PATTERN uses a usual shell glob syntax. If shell wildcards are not used, it must match the ex‐ act interface name. This option may be specified multiple times resulting in more than one pattern being excluded."
            },
            {
                "flag": "-o",
                "long": null,
                "arg": null,
                "description": "Set OPTION to VALUE as though it were in /etc/network/interfaces."
            },
            {
                "flag": "-n",
                "long": "--no-act",
                "arg": null,
                "description": "Don't configure any interfaces or run any \"up\" or \"down\" commands."
            },
            {
                "flag": "",
                "long": "--no-mappings",
                "arg": null,
                "description": "Don't run any mappings. See interfaces(5) for more information about the mapping fea‐ ture."
            },
            {
                "flag": "",
                "long": "--no-scripts",
                "arg": null,
                "description": "Don't run any scripts under /etc/network/if-*.d/"
            },
            {
                "flag": "",
                "long": "--no-loopback",
                "arg": null,
                "description": "Disable special handling of the loopback interface. By default, the loopback interface (lo on Linux) is predefined internally as an auto interface, so it's brought up on ifup -a automatically. In the case the loopback device is redefined by user, the in‐ terface is configured just once anyway. If, however, another interface is also defined as loopback, it's configured as usual. Specifying this option disables this behaviour, so the loopback interface won't be configured automatically."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Show copyright and version information."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Show commands as they are executed."
            },
            {
                "flag": "-l",
                "long": "--list",
                "arg": null,
                "description": "For ifquery, list all the interfaces which match the specified class. If no class specified, prints all the interfaces listed as auto."
            },
            {
                "flag": "",
                "long": "--state",
                "arg": null,
                "description": "For ifquery, dump the state of the interfaces. When no interfaces specified, lists all interfaces brought up together with logical interfaces assigned to them and exits with a status code indicating success. If one or more interfaces specified, display state of these interfaces only; successful code is returned if all of interfaces given as arguments are up. Otherwise, 0 is returned."
            }
        ],
        "examples": [
            "Bring up all the interfaces defined with auto in /etc/network/interfaces",
            "Bring up interface eth0",
            "Bring up interface eth0 as logical interface home",
            "Bring down all interfaces that are currently up.",
            "Print names of all interfaces specified with the auto keyword.",
            "Print names of all interfaces specified with the allow-hotplug keyword.",
            "Display  the  interface  options as specified in the ifupdown configuration. Each key-",
            "value pair is printed out on individual line using \": \" as separator."
        ],
        "see_also": [
            {
                "name": "interfaces",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/interfaces/5/json"
            },
            {
                "name": "ip",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/ip/8/json"
            },
            {
                "name": "ifconfig",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/ifconfig/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-a --all",
                        "lines": 7,
                        "flag": "-a",
                        "long": "--all"
                    },
                    {
                        "name": "--force",
                        "lines": 2,
                        "long": "--force"
                    },
                    {
                        "name": "--ignore-errors",
                        "lines": 2,
                        "long": "--ignore-errors"
                    },
                    {
                        "name": "-h --help",
                        "lines": 6,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-i --interfaces=",
                        "lines": 5,
                        "flag": "-i"
                    },
                    {
                        "name": "-X --exclude=",
                        "lines": 5,
                        "flag": "-X"
                    },
                    {
                        "name": "-o",
                        "lines": 2,
                        "flag": "-o"
                    },
                    {
                        "name": "-n --no-act",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--no-act"
                    },
                    {
                        "name": "--no-mappings",
                        "lines": 3,
                        "long": "--no-mappings"
                    },
                    {
                        "name": "--no-scripts",
                        "lines": 2,
                        "long": "--no-scripts"
                    },
                    {
                        "name": "--no-loopback",
                        "lines": 7,
                        "long": "--no-loopback"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-l --list",
                        "lines": 3,
                        "flag": "-l",
                        "long": "--list"
                    },
                    {
                        "name": "--state",
                        "lines": 6,
                        "long": "--state"
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "ifup -a",
                        "lines": 2
                    },
                    {
                        "name": "ifup eth0",
                        "lines": 2
                    },
                    {
                        "name": "ifup eth0=home",
                        "lines": 2
                    },
                    {
                        "name": "ifdown -a",
                        "lines": 2
                    },
                    {
                        "name": "ifquery -l",
                        "lines": 2
                    },
                    {
                        "name": "ifquery -l --allow=hotplug",
                        "lines": 2
                    },
                    {
                        "name": "ifquery eth0",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "CONCURRENCY",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "KNOWN BUGS/LIMITATIONS",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}