ifdown
Deactivate network interface
TLDR
Disable interface eth0
Disable all interfaces which are enabled
SYNOPSIS
ifdown [options] <interface>
PARAMETERS
-h, --help
Display help text and exit.
-v, --verbose
Enable verbose mode; provides more detailed output.
-n, --no-act
Don't actually execute commands; just print what would be done.
-i, --interfaces <file>
Use specified interfaces file instead of /etc/network/interfaces.
-f, --force
Force deconfiguration even if the interface is not managed.
-a, --all
Bring down all interfaces defined in /etc/network/interfaces.
DESCRIPTION
The ifdown command deactivates a network interface in Linux. It's typically used with configuration files in /etc/network/interfaces (on Debian-based systems) to manage network settings. The command takes the interface name as an argument. It executes scripts located in /etc/network/if-down.d/ to cleanly shut down the interface, unconfiguring IP addresses, removing routes, and stopping related services.
ifdown ensures a controlled shutdown process, preventing data loss or unexpected behavior due to abrupt disconnection. This is crucial for maintaining network stability and preventing connectivity issues. It interacts with the operating system's networking stack to properly disable the specified interface. ifdown is often used in conjunction with ifup to bring interfaces up and down as needed. Some distributions utilize NetworkManager, making ifdown less relevant for typical use cases. However, understanding ifdown remains important for system administrators managing network configurations directly.
EXIT STATUS
ifdown returns 0 if it succeeds; otherwise, it returns a non-zero error code.
CONFIGURATION FILES
The primary configuration file used by ifdown is /etc/network/interfaces. This file defines the network interfaces and their configuration settings.