-1

I have an ubuntu 18.04 linux server.

Why does the command(ifconfig eth) says Device not found whereas this command(ifconfig eth0) works?

$ ifconfig eth eth: error fetching interface information: Device not found $ ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001 inet 96.114.208.69 netmask 255.255.255.128 broadcast 96.114.208.127 inet6 fe80::8a9:12ff:fe5b:c324 prefixlen 64 scopeid 0x20<link> ether 0a:a9:12:5b:c3:24 txqueuelen 1000 (Ethernet) RX packets 5126229 bytes 7622036755 (7.6 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1823543 bytes 124228703 (124.2 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 

Note: I tried the same thing on my other 14.04 linux server. Both commands are working

1
  • Post the output from the working systemCommentedAug 17, 2018 at 12:11

1 Answer 1

2

Because you don' t have any eth device, but you have the eth0.
If you use ifconfig -a or ip addr you can see all the devices available.

5
  • on ubuntu 14.04 server, both commands returns same output
    – Nani
    CommentedAug 17, 2018 at 14:03
  • ubuntu@ip-96-114-208-17:~$ ifconfig eth eth0 Link encap:Ethernet HWaddr 0a:c6:8c:f3:88:84 inet addr:96.114.208.17 Bcast:96.114.208.127 Mask:255.255.255.128 inet6 addr: fe80::8c6:8cff:fef3:8884/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1 RX packets:3073083 errors:0 dropped:0 overruns:0 frame:0 TX packets:17790249 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:628310363 (628.3 MB) TX bytes:25682765383 (25.6 GB)
    – Nani
    CommentedAug 17, 2018 at 14:05
  • ubuntu@ip-96-114-208-17:~$ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 0a:c6:8c:f3:88:84 inet addr:96.114.208.17 Bcast:96.114.208.127 Mask:255.255.255.128 inet6 addr: fe80::8c6:8cff:fef3:8884/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1 RX packets:3073247 errors:0 dropped:0 overruns:0 frame:0 TX packets:17792171 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:628338790 (628.3 MB) TX bytes:25685051888 (25.6 GB)
    – Nani
    CommentedAug 17, 2018 at 14:06
  • In the question you said that the output is different and that you are using ubuntu 18.04 server and not the 14.04. What is the output of ifconfig -a ?
    – Scorpion
    CommentedAug 17, 2018 at 19:00
  • @Nani it's probably a good idea to omit your public IP address from your PS1 (since it contains your IP) and the output of ifconfig. Also formatting in a comment can be difficult to read, so you would likely get a better response if you're to amend your question with those outputs rather than in the comments :)CommentedAug 20, 2018 at 8:13

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.