How to change ethernet card configuration

Sometimes when you move a hard disk, containing ubuntu with ip set statically, to another PC you may not be able to see your ethernet card in ifconfig.

Why? Because linux is smart, it auto detects new ethernet and give your current ethernet next available label, like : eth1.

Solution :

1) If user edit it back using mcedit /etc/network/interfaces, from eth1 to eth0 and then restart the network, all will be just fine.

2) For a better and advance solution :
– mcedit /etc/udev/rules.d/70-persistent-net.rules

– remove eth0 line only and edit “eth1 to eth0

– you can easily check which label currently active by testing with a command line
ifconfig eth0
ifconfig eth1
ifconfig eth2
ifconfig eth3
and so on…

You may also like