Easy route:
Use sudo dhclient and hope your DHCP server assigns an IP address, default gateway, and name servers (DNS).
Long route:
ifconfig on it's own only display configured network cards. It seems for now your network card is unconfigured and you are viewing your loopback adapter which is a default adaptor that should always be there.
Try ifconfig -a. This will display all cards available and the ethernet interface id for those cards. Look for something like eth0 or eth1.
To quickly configure a card, do something like this:
sudo ifconfig eth0 192.168.0.2.
Of course eth0 is dependant on the result of your ifconfig -a and the IP address is dependant on your environment.
This will bring your machine online. Now you can hopefully ping your default gateway.
To assign your default gateway do this:
sudo route add default gw 192.168.0.1
Again the IP 192.168.0.1 is dependant on your environment. If you have a Windows machine you can do ipconfig -all to get most of the required information.
Now you can hopefully ping the Internet, but you won't be able to resolve names. So you can ping 196.25.1.1 but not ping www.google.com. For that you have to assign a DNS server. To do this:
Edit /etc/resolv.conf
I use mc -e (Midnight Commander) but you might prefer to use vi which is built into most Unix systems.
Add the following to resolv.conf:
nameserver 8.8.8.8
and save. Now you should be able to ping the Internet and get online using a browser. You are temporarily using Google's public name server at 8.8.8.8.
At this point we normally install Webmin :-) http://www.webmin.com/
Webmin makes is 10x easier to configure and check network cards. In Webmin, use the Networking / Network Configuration and then:
Network Interfaces (IP address)
Routing and Gateways (Default gateway)
Hostname and DNS Client (DNS servers)
menus to configure your card.
Checking /etc/network/interfaces
You might also want to check /etc/network/interfaces because that is where the resultant configuration information is stored. On a DHCP enabled machine you have something like this:
user@computer:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
On a fixed IP machine you will have values like this (depends on environment):
user@computer2:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The auto command
auto lo eth1
# The loopback network interface
iface lo inet loopback
# The rest
iface eth1 inet static
address 192.168.0.2
netmask 255.255.255.0
broadcast 192.168.0.255
network 192.168.0.0
gateway 192.168.0.1
Please note the above file contains just the IP address and default gateway.
The sum of our solution is to get the IP address, default gateway, and DNS servers (in /etc/resolv.conf) right. Good luck, this can sometimes be a bit of a nightmare if it doesn't work right out the box / upgrade.