Take the 2-minute tour ×
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.

I had a problem with eth0 interface.
I installed linux distribution version 11.10 and I want to set static IP address to my linux computer. When I run ifconfig, it didn't print the eth0 interface. It seems it isn't detected by the system, even if I edit the file /etc/network/interfaces this way :

auto eth0 
iface eth0 inet static
address = x.x.x.x
netmask = x.x.x.x
getway = x.x.x.x

Is there any solution to set static ip address to my computer or any solution to enable eth0 interface when I run ifconfig command in terminal ?

share|improve this question
5  
"Linux distribution" isn't a real thing. Something can be a Linux distribution - which one did you install? –  strugee Jul 29 '13 at 7:06
1  
Try inserting the line auto eth0 above the text you've put in the interfaces file. –  Flup Jul 29 '13 at 7:17
    
Dear Flup i added auto eth0 before if you read my question properly and one thing more i want to say when we run ifconfig command there should be lo interface and eth0 interface with all the specification so i didn't have eth0 so please help me in this problem if possible –  Farhad Farahmand Jul 29 '13 at 9:17
1  
Which Linux distribution? What does ifconfig -a report? What network adapter do you have (if you don't know, copy-paste the output of lspci)? –  Gilles Jul 29 '13 at 23:38
    
Dear linux Expert Gilles : i Used Ubuntu 11.10 please Add me in you Skype ID : Farhad.paywast –  Farhad Farahmand Jul 31 '13 at 4:07
add comment

closed as unclear what you're asking by Gilles, jasonwryan, slm, Anthon, Mat Jul 30 '13 at 5:17

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

I can't add a comment =/ Not enough reputation... So if someone can add my answer as a comment if its not as helpful as I thought.

Maybe a ifup eth0 will help you ? and something like service networking stop/start or /etc/init.d/networking stop/start

share|improve this answer
    
i did the following things that you mention so please help me if you had any good idea or solution that is to be useful for what i want –  Farhad Farahmand Jul 29 '13 at 9:20
add comment

Quick answer: Assuming you installed Ubuntu 11.10, it sounds like the kernel included is too old to recognize your ethernet controller--it dates from 2011, after all! Try installing a newer version.

Further diagnosis: Run lspci -k to see if any Ethernet interfaces are present on your system. On my system, for instance, I see:

00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
    Subsystem: Intel Corporation PRO/1000 MT Desktop Adapter
    Kernel driver in use: e1000

If you see something like that, but without the Kernel driver in use bit, then install the newer version of Ubuntu. If you do see Kernel driver in use, then run ip link to see the names of all the network interfaces on your system. On mine, I can see other other interface, besides lo:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 08:00:27:57:10:b2 brd ff:ff:ff:ff:ff:ff
share|improve this answer
    
I installed the newer version as well like 12.04 but again i have the same problem so i think it is disable or my network interface card fault –  Farhad Farahmand Jul 29 '13 at 11:48
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.