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.
Recommended Posts:
- arp command in Linux with examples
- w command in Linux with Examples
- which command in Linux with examples
- cd command in Linux with Examples
- id command in Linux with examples
- ed command in Linux with examples
- gcc command in Linux with examples
- gs command in Linux with Examples
- cc command in Linux with Examples
- yes command in Linux with Examples
- for command in Linux with Examples
- fg command in Linux with examples
- man command in Linux with Examples
- top command in Linux with Examples
- rm 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 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.



