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 have 2 networking interfaces eth0 (wired) and wlan0 (wireless). Every time the computer boots it tries to bring up both. Most often when there is a LAN cable I don't need wlan0, and vice versa, so this looks like a waste. I want to stop the interfaces from being brought up automatically so that I can bring up the one that I need, if at all.

According to the Gentoo Handbook I need to run

# rc-update add net.eth0 default

to have eth0 up every time the system boots and I assume the same thing goes for wlan0. However the result of

# rc-update show

does not contain either eth0 or wlan0.

So the question is, who is bringing up the 2 interfaces? How can I stop that?

share|improve this question

Some services requires network service (i.e. they use network ;) ). The RC_NET_STRICT_CHECKING variable from /etc/conf.d/rc determines when the service is 'up'. Particulary the "no" setting seems to describe something similar to what you want:

#  no    - This basically means that at least one net.* service besides net.lo
#          must be up.  This can be used by notebook users that have a wifi and
#          a static nic, and only wants one up at any given time to have the
#          'net' service seen as up.

I guess that configuration you described is particulary useful in mobile enviroment and, personally, I prefere to use net-misc/networkmanager to manage network for me and disable Gentoo script managing (which is mostly suitable for servers and have no proper handling of hibernations, dynamic configuration etc.).

share|improve this answer
I tried changing this variable around but it doesn't seem to make any difference. BTW how do you disable the script managing? – phunehehe Dec 8 '10 at 14:17
By removing /etc/init.d/net.wlan0 and /etc/init.d/net.eth0 (both are only symlinks to ``/etc/init.d/net.lo` so don't worry). – Maciej Piechotka Dec 8 '10 at 21:33
nice, I'll try that – phunehehe Dec 9 '10 at 12:27
/etc/conf.d/rc is deprecated and doesn't work anymore under the new baselayout-2/openrc boot system. /etc/rc.conf is the new equivalent. – John Flatness May 27 '11 at 17:19

I do this because I use NetworkManager to handle my connections, and I wanted to stop Gentoo from always trying and failing to get an IP through DHCP for my almost-always-unconnected eth0.

The following setting in /etc/rc.conf/:


stops Gentoo from trying to automagically start any of the net. services, but you can still manually add them to runlevels or directly call the /etc/init.d/ scripts for them.

share|improve this answer

Gentoo does device based services. There is a setting in if I /etc/conf.d/rc that allows you to override this. What you probably want to do is to use networkmanager which works nicely with laptops and their changing connectivity. There are some gentoo networkmanager manuals available just a google search away.

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.