ifdown command in Linux with Examples
Last Updated :
11 Jul, 2025
The 'ifdown' command in Linux is a vital tool for system administrators and network engineers. It is used to bring network interfaces down, essentially disabling them so they cannot transmit or receive data. Unlike the 'ifup' command, which activates the network interface, 'ifdown' places the interface in a non-operational state, preventing it from handling network traffic.
Here, we will cover everything you need to know about the 'ifdown' command, its syntax, options, and practical examples.
Syntax
ifdown [-nv] [--no-act] [--verbose] [-i FILE|--interfaces=FILE] [--allow CLASS] -a|IFACE...
where,
- IFACE refers to the network interface (e.g., eth0, wlan0) you want to bring down.
- '-a' is used to bring down all network interfaces defined in '/etc/network/interfaces'.
Key Options Available with ifdown Command
1. -a(--all)
This option is used to bring all the interfaces down which are defined in '/etc/network/interfaces'. 
2. --allow=CLASS
This option will only allow interfaces listed in an allow-CLASS line in '/etc/network/interfaces' to be acted upon.
3. -v(--verbose)
Display detailed information about the commands being executed.
4. -V(--version)
Show version and copyright information of the ifdown command.
ifdown Command Example in Linux
Let us execute a ping command to check the working of my interfaces, they are already configured. 
Now try to down the interface down using the following command. Here, sudo is used for permissions, '-a' to work on all devices and v for verbose the output.
sudo ifdown -av

Let us check our ping test and browser. 
Conclusion
The ifdown command is an essential tool for managing network interfaces in Linux. By learning how to bring down interfaces selectively or all at once, you can control network traffic, perform maintenance tasks, or troubleshoot network issues with ease. Understanding the available options, such as verbose output, class filtering, and simulation mode, further enhances your ability to manage complex network setups efficiently.
Similar Reads
if command in linux with examples if command in Linux is used for conditional execution in shell scripts.The if command is essential for writing scripts that perform different actions based on different conditions.if COMMANDS list is executed, if its status is true, then the then COMMANDS list is executed. Otherwise, each elif COMMA
4 min read
fc Command in Linux with Examples As we all know that LINUX is command friendly and while working on LINUX, you may deal with very long commands that may include long paths or really difficult syntax, and imagine what if working with such commands you do a minor mistake which will require re-writing of the entire command synopsis an
3 min read
function command in Linux with examples The function is a command in Linux that is used to create functions or methods. It is used to perform a specific task or a set of instructions. It allows users to create shortcuts for lengthy tasks making the command-line experience more efficient and convenient. The function can be created in the u
2 min read
file command in Linux with examples The 'file' command in Linux is a vital utility for determining the type of a file. It identifies file types by examining their content rather than their file extensions, making it an indispensable tool for users who work with various file formats. The file type can be displayed in a human-readable f
3 min read
file command in Linux with examples The 'file' command in Linux is a vital utility for determining the type of a file. It identifies file types by examining their content rather than their file extensions, making it an indispensable tool for users who work with various file formats. The file type can be displayed in a human-readable f
3 min read
gawk command in Linux with Examples The gawk command in Linux is a pattern scanning and processing language. No compilation is required, and variables can be used along with numeric functions, string functions, and logical operators. Gawk is a utility that enables programmers to write highly compact but still effective programs as sta
3 min read