Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a recent install of ubuntu server (all command line) and at the time of the install I was not connected to the internet.

when entering sudo apt-get update I get a bunch of messages saying failed to fetch repos.

I am unable to ping google, askubuntu, or any other site

sudo lshw -class network

indicates both eth0 and eth1 are disabled.

ifup eth0 

results in

ignoring unknown interface eth0=eth0

is there a way to test the connection from cable modem to machine is ok? (I checked a few times and believe my cable/connections are ok, but I can check again)

thanks bp

share|improve this question

1 Answer 1

up vote 2 down vote accepted
  1. Check your network interfaces with: cat /etc/network/interfaces
    1. It should look like something like this:

The loopback network interface auto lo iface lo inet loopback

The primary network interface auto eth0 iface eth0 inet dhcp

  1. sudo service network-manager restart
  2. sudo ifconfig eth0 up
  3. sudo dhclient eth0

Now your connection should be fine.

share|improve this answer
    
that did the trick thanks!! –  badperson Jan 25 '13 at 13:24
    
another q...I find I have to do this step after restarting. Is there a way to make it automatic? –  badperson Jan 25 '13 at 14:21
    
Well, you can put all the commands in a little script, then let cron call the script at every boot. I'll look into this and will look for other ways to win the pot of gold at the end of the rainbow. I've got a daytime job so this might take some time... –  C Schilder Jan 29 '13 at 8:14
    
you might take a look here. or here. –  C Schilder Jan 30 '13 at 13:16

Your Answer

 
discard

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.