If you encounter missing network drivers when installing Ubuntu on new machines, you might notice that network cards are listed as (UNCLAIMED)
when you execute the command:
lshw -c network
This indicates that your device requires Hardware Enablement (HWE).
Hardware Enablement (HWE) ensures that Ubuntu remains compatible with the latest hardware technologies, even if the hardware is released after an Ubuntu version. This is achieved by regularly updating the kernel through rolling releases, providing support for new hardware devices. Installing HWE
#To install Hardware Enablement on Ubuntu 20.04, you can use the following commands:
sudo apt install --install-recommends linux-generic-hwe-20.04
or
sudo apt install linux-generic-hwe-20.04
After installing HWE, your network drivers should now be recognized. You can verify this by executing:
ip a
Navigate to the Netplan configuration directory:
cd /etc/netplan/
Choose a configuration file (the name might differ), for example:
nano 00-installer-config.yaml
Edit the configuration file to look like this:
network:
version: 2
ethernets:
eth0: # Replace 'eth0' with your network driver name listed above
dhcp4: true
Apply the changes:
sudo netplan apply
You can also debug any issues with applying the configuration using:
sudo netplan --debug apply
Once the changes are applied, check if your network card has obtained an IP address:
ifconfig