Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

Why would my new CentOS Virtual Machine not start eth0 on startup? I have to start it manually every time. How can I fix this?


share|improve this question
up vote 19 down vote accepted

Make sure ONBOOT="yes" is in /etc/sysconfig/network-scripts/ifcfg-eth0. If you're using NetworkManager, make sure that service starts on boot (chkconfig NetworkManager on), otherwise, if you're using the old network service, make sure it starts on boot (chkconfig network on).

share|improve this answer
Doh! Wonder why it would ever be NO by default? Thanks. – Thom Apr 11 '12 at 14:31
When you install from the DVD with CentOS6, it doesn't enable the network interface by default. One of the known (and frustrating) annoyances with RHEL6/CentOS6 DVD install. – jsbillings Apr 12 '12 at 22:23
Sigh...You ever look at something and go, "Now who on earth looked at this and said, 'Yeah! That's the way it should work!'?" – Thom Apr 12 '12 at 23:20

Regarding CentOS6 not enabling the network interface by default: it (in the GUI installer, at least) does its very best to prevent the interface from being set up properly, but this can be defeated via a checkbox that's hidden a couple dialogs deep from the main flow.

On the screen where you enter the hostname, the "Configure Network" button at the bottom takes you to a "Network Connections" dialog. Select eth0, then the "Edit" button takes you to an "Editing System eth0" dialog, which has a "Connect automatically" checkbox. If you leave this box unchecked, you get ONBOOT="no" in /etc/sysconfig/network-scripts/ifcfg-eth0; if you check it, you get ONBOOT="yes". I don't know if the checkbox affects any other configs, but I've yet to notice any different behavior. Why the box isn't checked by default, I can't begin to imagine.

share|improve this answer

I don't know if it could help but I just created the file /etc/sysconfig/network with


And it seems that now my scripts in /etc/sysconfig/network-scripts/ifcfg-* seem to work.

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.