Skip to content

Instantly share code, notes, and snippets.

@swagfin
Last active March 23, 2024 09:33
Show Gist options
  • Save swagfin/5db7e1042f30ae3778a5cd0cc5f3a3cd to your computer and use it in GitHub Desktop.
Save swagfin/5db7e1042f30ae3778a5cd0cc5f3a3cd to your computer and use it in GitHub Desktop.
Fixing Network Driver Issues on Ubuntu 20.04

Fixing Network Driver Issues on Ubuntu 20.04

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).

About 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

Setting Defaults Using Netplan

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

Finalizing

Once the changes are applied, check if your network card has obtained an IP address:

ifconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment