Ubuntu 12.04 Networking on fresh install

Whenever I setup a new ubuntu install, networking never seems to work out of the box. Here are the steps to get it working

Press Alt + F2 and type in ‘Terminal’

nano /etc/network/interfaces

Edit the line that says

iface eth0 inet manual

replace the word manual with dhcp. It should look like this

iface eth0 inet dhcp

Save the file and exit nano

Enter the following commands one at a time

sudo ifdown eth0

sudo ifup eth0

sudo service networking stop

sudo service networking start

You can then test your connection is working by entering

ping -c3 8.8.8.8

If you got a reply then internet is working. Go through all the steps again and double check they were entered correctly. If all else fails, restart the computer.

So people new to linux might wonder what all those commands were.

Basically you edited a file that sets the ethernet port to get an ip address from a dhcp server instead of assigning itself one. Then you turned off the ethernet port and turned it back on. Finally you restarted the program that manages the connection to the internet.

Advertisements

About spuder
spuder is a "super computer" support engineer by day, and tinkerer / hobbyist by night.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: