ifup command in Linux with Examples

The ifup command basically brings the network interface up, allowing it to transmit and receive data. Technically ifup command is used to configure network interfaces based on interface definitions in the file /etc/network/interfaces.

Syntax:

ifup [-nv] [--no-act] [--verbose] [-i FILE|--interfaces=FILE] [--allow CLASS] -a|IFACE...

Example: Let us see an example when our interface is down and how the browser reacts to it.

In this case, the interface was not up and configured. To get the network interface up and work we use

sudo ifup -av

Here, sudo is used for permissions, -a to work on all devices and v for verbose the output.

After using ifup command, the network is working:

Options:

  • -a(–all): If used this option it affects all the interfaces marked as auto. Brings up interfaces in order they are defined /etc/network/interfaces. Combined with –allow, acts on all interfaces of a specified class instead.
  • –force: Force configuration or deconfiguration of the interface.
  • -V: Prints the version information.
  • -v: Verbose the output as they are executed.


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. 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.