Warren Vercueil has written a nice and thorough guide on getting FS-UAE on Linux set up with real MIDI hardware. The guide was written to use Bars and Pipes with MIDI hardware, but should work with other Amiga MIDI software as well.
Disclaimer: I haven’t tested the guide myself.
Note: If all you want to do is to play back MIDI tunes, for example to use FS-UAE to play Sierra games with MT-32 music (using an MT-32 emulator on your host computer), you should wait until FS-UAE 3.9.x arrives, which should support this use case on all platforms via the portmidi library.