When Linux Ubuntu cannot connect to the Internet, Windows OS can connect to the Internet .What’s the different?
Can be try to init LAN Port in Linux.
ifconfig -a
nep1s0 is LAN port name if your LAN port name is different ,please set according to your LAN port name.
ifconfig enp1s0 up
dhclient enp1s0
ifconfig -a
You will find enp1s0 get the dhcp IP
Network card setting reference editor e.g. nano/vi/vim
sudo nano /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp1s0
iface enp1s0 inet dhcp
sudo /etc/init.d/networking restart