As for Linux, well... that's more difficult, even under Ubuntu with GUI apps for help. You need to have two audio apps installed and actively running and setup just right in-order for midi to produce any sound on Linux, which are "Qsynth" the midi soundfont player and "QjackCtl/Jack Audio" which is the audio stream controller.
Note, if you're running Linux in a virtual machine chances are it won't handle midi playback properly even if everything is setup right. I tested this under Ubuntu v20 I think a few years back and the midi playback was horribly distorted - don't think the IO rate between the virtual machine and the real machine was up to the job.
Unfortunately on Linux it can be rather difficult to say the least to get midi working right, and more often than not you want to hit the screen in frustration. Sadly, there is no simple "just do it" option to get things working as you'd expect.
In addition, Qsynth loves to generate multiple midi playback devices, like 6 or more, of which only one or two from my experience actually render any sound. To help with this frustration, Cynthia has a play all midi device option (main GUI bottom right, Playback Device, select "A"). This way, if only one of six or more midi devices on Linux is capable of sound playback Cynthia will get it working. Unfortunately Qsynth and Jack can be a real pain to setup and keep working.
Online is stating that PipeWire is now the default instead of PulseAudio or Jack. From my understanding they both sit on top of ALSA, the audio hardware driver.
So for things to go right you need: 1) Cynthia directed to playback through a working midi input device (she has a playback device range of 1-10, or "A" for all of them at once) 2) The midi input device is synthesised by FluidSynth which takes Cynthia's midi instructions and converts them into wave audio output 3) The wave audio output is directed to PipeWire/PulseAudio/Jack Audio 4) PipeWire/PulseAudio/Jack Audio ultimately direct it at your machine's hardware driver/handler, ALSA, which directs to your soundcard/sound chip and out to your speakers/headphones if all goes well.
I've read online that Jack is the pro option, which is why it was so complicated to do the basics, and PipeWire/PulseAudio are a little more user friendly?
If you switch Cynthia's Playback Device to "A" (bottom right of main GUI), she will play/broadcast her midi notes/instructions to all available midi input devices simultaneously, so if you have at least one midi input device producing sound, you should get something coming through to your speakers/headphones.
Unfortunately, I can't offer you much more help than this, as I'm not familiar with PipeWire/PulseAudio, and as far as I know FluidSynth was controlled behind the scenes (under the hood) by Qsynth's GUI.