Take the 2-minute tour ×

I want to organize interface aliases (for example eth0:1) in separate files (/etc/network/conf.d/eth0_1.cnf).

Anyone know the syntax to load this external file from /etc/network/interfaces, or where I can find it? I do not want the interface to start automatically.

I've had a look at man interfaces(8) without any luck. But I have seen this done before, and know it's possible.

I tried load /etc/network/conf.d/eth0_1.cnf and include /etc/network/conf.d/eth0_1.cnf directives, no dice.

OS is ubuntu 11. Any ideas are really appreciated.

Edit: Thanks. When I saw this done before it was on centos/rh.

Edit: source looks promising but I can't seem to get it going. When I put:

source /etc/network/interfaces.d/*.conf

at the top of


I get the error: /etc/network/interfaces:3: misplaced option

So maybe this didn't get included in Ubuntu 11.04? Where did you see that it was included there?

share|improve this question
The magic word is source. See updated answer. –  Michał Šrajer Oct 4 '11 at 14:36
add comment

1 Answer

from man 5 interfaces KNOWN BUGS/LIMITATIONS section:

It is not currently possible to divide up /etc/network/interfaces into multiple files. A feature that would make this possible is some sort of inclusion directive. No such feature exists in the current ifupdown program. For more information see Debian bug #159884.


Since ubuntu 11.10:

Lines beginning with "source" are used to include stanzas from other files, so configuration can be split into many files. The word "source" is followed by the path of file to be sourced. Shell wildcards can be used. (See wordexp(3) for details.)

So the syntax is:

source path/to/configfile
share|improve this answer
add comment

Your Answer


