how do you mod the linux version of the game

The modding wiki should help out as above just like Kiwi said, though StarMap (mod loader for KSA) currently doesn't support Linux and so code mods will not work with KSA on Linux at the moment. Part mods, planet mods, etc should work.
Code mods will work on Linux, you just need to do the following:

 
  • Like
Reactions: Kiwi Shark
Code mods will work on Linux, you just need to do the following:

Thanks Maxi, this should be documented on the modding wiki
 
  • Like
Reactions: Maxi