i am using centos 7. I am typing the command
ip addr show eth0
but its reply Device "eth0" does not exist.
i am using centos 7. I am typing the command
ip addr show eth0
but its reply Device "eth0" does not exist.
In CentOS, network interfaces are named differently. So they aren't called eth0 or eth1, but rather have names like eno1 or enp2s0. (Source.)
Run ip addr to see how these interfaces are named on your system.
These names are defined in /etc/sysconfig/network-scripts/ifcfg-<iface>. You can change their names if you really wanted to, but I don't recommend it.
RHEL / CentOS 7.x uses consistent network device naming. And it might also be called predictable network interface names.
in any case the best way I have found to get eth naming back is to
You do not need to mess with anything under /etc/sysconfig/.
enp– Milad Alkhamis Feb 06 '23 at 06:23/devlocation? It seems that’s not possible: Why are network interfaces not in /dev like other devices? and Is there a device file in the /dev directory that represents the wireless adapter? – Edgar Magallon Feb 06 '23 at 22:07/dev? I commented again this because the comments have been moved to the question (but I did it to point to your comment and not to the OP) – Edgar Magallon Feb 06 '23 at 22:08