I installed Ubuntu server on a 2011 iMac and set up the WiFi when promoted. After setup I decided to add a GUI by running
sudo apt install ubuntu-desktop
when I rebooted I installed Firefox and Chrome and ran a google search and they both of them worked. In settings, it says
no wifi adapter found
but when I run lspci | grep -i network, it shows a detected WiFi controller.