Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to determine if the order of the options matter

I'm using a script (represents an external remote interface) that is updating the /etc/network/interfaces file.

The script can set the IP Address, Default Gateway, and Netmask.

My question is does the order of the options matter i.e.

#standard options
auto eth0
iface eth0 inet static

#possible script output
auto eth0
iface eth0 inet static

Is this still an acceptable configuration?

share|improve this question
I'd say that it shouldn't make any difference, but I won't guarantee that it doesn't... What distro are you on? – Jenny D Feb 25 '14 at 15:32
This looks like either Debian or Ubuntu. – slm Feb 25 '14 at 15:35
Is there any reason you don't have your script print stuff in the desired order? – terdon Feb 25 '14 at 15:36
Why do you think it would matter? You're passing a bunch of options by name. Nothing defines a “correct” order. – Gilles Feb 25 '14 at 23:48
Debian variant, it's for an embedded system. The scripts are effectively an external UI interface so order can't be guaranteed. I didn't think it would matter just wanted some confirmation on it since the documentation doesn't indicate it as an explicit issue. – user61316 Feb 26 '14 at 16:12

In your specific case it does not matter but in case you get several interface, and also if you use conditional configuration the order can became important.
For example in this case

iface eth0 inet static
address 88.191.xxx.zzz 
broadcast 88.191.xxx.zzz 
post-up route add 88.190.cc.1 dev eth0
post-up route add default gw 88.190.cc.1
post-down route del 88.190.cc.1 dev eth0
post-down route del default gw 88.190.cc.1

if you put the post-up post-down in the wrong order nothing works.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.