ifdown
Deactivate network interface
TLDR
Disable interface eth0
Disable all interfaces which are enabled
SYNOPSIS
ifdown [-vna m] [--force] [ifname]
PARAMETERS
-a, --all
Deactivate all interfaces marked auto or allow-hotplug.
-v, --verbose
Increase output verbosity, showing actions taken.
-n, --noact, --dry-run
Simulate actions without changes (dry run).
-m, --force
Force deactivation, ignoring config errors.
--force=ifname
Force down even if dependents exist (ifdown only).
-h, --help
Display usage summary.
--version
Show version information.
DESCRIPTION
ifdown is a command-line tool used to deactivate network interfaces on Linux systems utilizing the ifupdown framework, primarily in Debian-based distributions. It reads configuration from /etc/network/interfaces (or specified files) and executes scripts to bring down specified interfaces, stopping IP assignment, routing, and related services.
Typically invoked during system shutdown, boot scripts, or manual administration, ifdown calls pre/post-up/down hooks defined in the config. For example, it runs /etc/network/if-down.d/* scripts and interface-specific actions like flushing addresses or stopping DHCP.
Unlike general tools like ip link set down, ifdown respects full config semantics, including logical interfaces (aliases, VLANs). It's essential for scripted network management in non-systemd-networkd environments.
Modern alternatives include NetworkManager (nmcli), systemd-networkd, or direct ip commands, as ifupdown is considered legacy in some setups. Always requires root privileges; misuse can disrupt connectivity.
CAVEATS
Requires root privileges. Depends on valid /etc/network/interfaces; fails if interface undefined. Can disconnect active sessions. Not compatible with NetworkManager/systemd-networkd without disabling them. Deprecated in favor of modern tools.
CONFIGURATION FILE
/etc/network/interfaces or -i file; defines iface stanza with ifdown hooks.
SCRIPTS DIRECTORY
/etc/ifdown.d/ for custom pre/post-down actions per interface.
HISTORY
Developed in late 1990s by Bernd Eckenfels and Anthony Towns for Debian's sysvinit network setup. Part of ifupdown package since ~2000. Widely used in Ubuntu/Debian until systemd era; still maintained but legacy.


