Enter ifconfig to view the local ipv4 address, and found that it is not set, and cannot communicate with other hosts through Ethernet. Next, configure the Ethernet address of the system.
1. Edit the file /etc/network/interfaces:
sudo gedit /etc/network/interfaces
2. Replace the line related to eth0 with the following content, and replace the ip address and other information with yourself:
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.2.88
gateway 192.168.2.1
netmask 255.255.255.0
3. Use the following command to make the network settings take effect:
sudo /etc/init.d/networking restart
[ ok ] Restarting networking (via systemctl): networking.service.
4. Check the network address again and find that it has been modified successfully.