1

Please can someone explain to me more (maybe with examples ) about the following options in ifup command in Linux.

This is what I found on the internet, but with no more details about it :

  • --force Force configuration or deconfiguration of the interface.
  • --allow=CLASS Only allow interfaces listed in an allow-CLASS line in /etc/network/interfaces to be acted upon.
  • -X PATTERN, --exclude=PATTERN Exclude interfaces from the list of interfaces to operate on by the PATTERN. PATTERN uses a usual shell glob syntax. If shell wildcards are not used, it must match the exact interface name. This option may be specified multiple times resulting in more than one pattern being excluded.
  • -o OPTION=VALUE Set OPTION to VALUE as though it were in /etc/network/interfaces.
  • -n, --no-act Don't configure any interfaces or run any "up" or "down" commands.
  • --no-mappings Don't run any mappings. See interfaces for more information about the mapping feature.
  • --no-scripts Don't run any scripts under /etc/network/if-*.d/
  • -l, --list For ifquery, list all the interfaces which match the specified class. If no class specified, prints all the interfaces listed as auto.

I'm using Centos 6 and couldn't find the /etc/network/interfaces file, maybe because I'm using Network Manger and not static IP settings.

4
  • /etc/network/interfaces is a debian file. On CentOS the analogous file(s) are /etc/sysconfig/network-scripts/ifcfg-<dev> Apr 5, 2016 at 12:22
  • Thanks for the replay , i guess these options are not available in centor because the ifup command only takes the interface name Apr 5, 2016 at 17:09
  • sorry i mean centos Apr 14, 2016 at 10:40
  • Those options don't exist in the CentOs version of ifup. Try running man ifup to see if it lists any such options, if not, then you don't have a version with those flags/options. You'll need to move to, say, an Ubuntu system and then you can experiment with those options Apr 14, 2016 at 12:13

0

You must log in to answer this question.

Browse other questions tagged .