LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ifdown

Bring down network interfaces previously configured with ifup

TLDR

Disable a specific interface
$ ifdown [eth0]
copy
Disable all enabled interfaces
$ ifdown -a
copy
Show commands without running them (dry run)
$ ifdown -n [eth0]
copy
Force deconfiguration even if interface state says it is down
$ ifdown --force [eth0]
copy
Verbose output
$ ifdown -v [eth0]
copy
Use an alternate interfaces file
$ ifdown -i [/path/to/interfaces] [eth0]
copy

SYNOPSIS

ifdown [options] interface

DESCRIPTION

ifdown brings down network interfaces that were previously configured with ifup. It reads interface definitions from /etc/network/interfaces and executes the appropriate commands and scripts to deconfigure the interface.The command performs any necessary cleanup including removing IP addresses, stopping DHCP clients, and running user-defined scripts defined in the interfaces file.

PARAMETERS

-a, --all

Affect all defined interfaces, brought down in the order listed in the state file.
--allow CLASS
Only act on interfaces listed in an `allow-CLASS` stanza in /etc/network/interfaces (e.g. `allow-hotplug`).
-i FILE, --interfaces=FILE
Read interface definitions from FILE instead of /etc/network/interfaces.
--state-dir=DIR
Keep interface state in DIR instead of /run/network.
-X PATTERN, --exclude=PATTERN
Exclude interfaces matching PATTERN.
-o OPTION=VALUE
Set OPTION to VALUE as if defined in /etc/network/interfaces.
-n, --no-act
Don't configure any interfaces or run up/down commands (dry run).
-v, --verbose
Show commands as they are executed.
-f, --force
Force deconfiguration even if ifupdown believes the interface is not up.
--ignore-errors
Continue even if a command or script fails.
--no-mappings
Do not run mappings during deconfiguration.
--no-scripts
Don't run any scripts under /etc/network/if-*.d/.
-V, --version
Show copyright and version information.
-h, --help
Show summary of options.

CAVEATS

Part of the ifupdown package, primarily used on Debian-based systems. Modern systems often use NetworkManager or systemd-networkd instead. Interface must have been brought up with ifup for ifdown to work correctly.

HISTORY

ifdown is part of the ifupdown package, the traditional network interface configuration system on Debian and derivatives. It has been used since the early days of Debian but is gradually being replaced by NetworkManager and systemd-networkd on desktop and server systems respectively.

SEE ALSO

ifup(8), ip(8), interfaces(5)

Copied to clipboard
Kai