First, modify the NIC name:
If the NIC name is not eth0, you can edit the/etc/default/grub file and then add the content:
vi/etc/Default/grub
and make it work through the Update-grub command.
Update-grub
Also edit/etc/network/interfaces
Add two lines in a diagram
Then restart the Ubuntu system, IP a command to see the NIC name.
Second, IP a view NIC name becomes eth1.
Reprint other People's------(solved by this method problem)
Many Linux distribution use Udev to dynamically manage device files and name them based on the device's information. Udev identifies the network card during system boot and records the MAC address and network card name in Udev's rules script. For a new virtual machine, VMware will automatically generate a MAC address for the virtual machine's network card, when you clone or reload the virtual machine software, because you are using the previous system virtual hard disk information, and the system has eth0 information, for this new network card, Udev will automatically name it eth1 (the cumulative principle), so after your system starts, you use Ifconfig to see the NIC named Eth1.
How to restore to eth0?
In Fedora, the script for Udev Records network rules is:/etc/udev/rules.d/70-persistent-net.rules
vi/etc/udev/rules.d/-persistent-net.rules
# This file is automatically generated by the/lib/udev/write_net_rules
# program run by the Persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# PCI Device 0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:5a:6c:73", attr{type}== "1", kernel== "eth*" , name= "Eth0"
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:a9:22:9d", attr{type}== "1", kernel== "eth*" , name= "Eth1"
Open the file, you will find that there is eth0,eth1 two network card information, but in fact you can only find the ifconfig eth1 a network card information, because Eth0 does not exist at all.
Delete the information in the eth0, and change the device name in the eth1 information to eth0, restart the system, you see the network card is eth0, or delete all of the information restart System Udev will help you find new equipment.
There is also a startup script file/etc/sysconfig/network-scripts/ifcfg-eth0, the MAC address in the file is the physical address of the original eth0 NIC, and the virtual machine assigns a new physical address to eth1. Therefore, the information in the startup script does not match the actual information, the MAC address information modified to 70-persistent-net.rules in the Eth1 MAC address, restart the network again, fully restored to the status of the previous eth0 NIC.
Third, SSH cannot link the problem
Vi/etc/ssh/sshd_config
Change the value in to Yes.
/etc/init.d/ssh restart
Restart the service.
Ubuntu modified NIC name, cannot find eth0, cannot ssh link problem record