Open In App

ifdown command in Linux with Examples

Improve
Improve
Like Article
Like
Save
Share
Report

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.

Syntax:

ifdown [-nv] [–no-act] [–verbose] [-i FILE|–interfaces=FILE] [–allow CLASS] -a|IFACE…

Options:

  • -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.

Example:

  • 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.


Last Updated : 20 Mar, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads