Both Ethernet and Wifi not working ubuntu 18.04

According to the specs from MSI on that board, the wifi is an AX210 card which won't work unless you are on Linux kernel version 5.10 or newer.

Also according to those specs, the Realtek card on your board for Ethernet is a "Realtek® 8125B 2.5G LAN" card. This is not supported in Linux until the 5.9 Kernel tree.

In order to support your hardware out of the box, you cannot install Ubuntu 18.04 or Ubuntu 20.04 at this time. The only version of Ubuntu that has a 5.11 kernel (or later) out of the box is 21.04, which means you will need to install Ubuntu 21.04, and not one of the LTSes.


If you must stick to Ubuntu 20.04, then there is the possibility that you can download a later version of the Ubuntu 20.04 image (the latest point release, 20.04.2) and install with HWE mode enabled, to install the 5.11 kernel that was backported to 20.04, however I do not guarantee that this will solve the problem officially, as I have not tested the HWE kernels.

You can attempt to do this by installing the relevant packages, if you have Internet some other way:

sudo apt install linux-{,image}-generic-hwe-20.04

And if you need the Kernel headers as well for compiling or driver support...

sudo apt install linux-headers-generic-hwe-20.04

Once you've done this, you must reboot to use the newer kernels. When you do, you may notice your system isn't working with GUI drivers anymore, so make sure you use the Ubuntu Drivers tool to install the proper drivers for HWE kernels if they are applicable:

sudo ubuntu-drivers install

If you don't choose to do this route to use the HWE kernels for 20.04, then you are going to have to install Ubuntu 21.04 and upgrade it to subsequent releases of Ubuntu as they are made available until you get to the next LTS release.