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 replicate in VMWare Player the exact same conditions I have under my Dedicated Server for testing purposes.

Now, the thing is that that when I try to install something, or ping http://google.com, it fails since it has no connection.

what do I do to fix it??


I'm not much of a sys admin, but i'll get there (This is my first Dedicated Server), I ordered a minimal OS to learn.

share|improve this question
ifconfig eth0 up – Laurentiu Roescu Nov 10 '12 at 18:07
@LaurentiuRoescu It would be awesome if you could explain me in more detail how to do it. I tried to edit /etc/sysconfig/network-scripts/ifcfg-eth0, and maybe I'm doing something wrong. – CoCoMonk Nov 10 '12 at 18:14
Could it be that you're simply in a too low run-level? What does who -r say? – Joseph R. Nov 10 '12 at 20:12
up vote 8 down vote accepted

I solved the issue by forcing the interface to get the IP via DHCP

This made the magic:

dhclient -v eth0

For more detail, check the accepted answer: CentOS doesnt know what the internet is

share|improve this answer

As root/sudo:

Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and add to the bottom:


also change the line that says ONBOOT to read as so:


Now you should run ifup eth0 and/or reboot your machine. It should pull a DHCP address every time now.

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.