Unlike ifup command the user can use ifdown command to bring network interface down, not allowing the user to transmit and receive data. Technically it places the network interface in a state where it cannot transmit or receive data. It is used to configure network interfaces based on interface definitions in the file /etc/network/interfaces.
ifdown [-nv] [–no-act] [–verbose] [-i FILE|–interfaces=FILE] [–allow CLASS] -a|IFACE…
- -a(–all): This option is used to bring all the interface down which are defined in /etc/network/interfaces.
- –allow=CLASS: This option will only allow interfaces listed in an allow-CLASS line in /etc/network/interfaces to be acted upon.
- -v(–verbose): Show or verbose commands as they are executed.
- -V(–version): Prints the Copyright and version information.
- 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.
- man command in Linux with Examples
- gcc command in Linux with examples
- rev command in Linux with Examples
- seq command in Linux with Examples
- if command in linux with examples
- apt command in linux with examples
- ssh command in Linux with Examples
- cp command in Linux with examples
- ip command in Linux with examples
- arp command in Linux with examples
- help Command in Linux with examples
- until command in Linux with Examples
- gdb command in Linux with examples
- cal command in Linux with Examples
- scp command in Linux with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.