On desktop Linux, Joplin is pretty awesome for this, but I personally use Marktext since it’s more like a code editor where you open a folder of Markdown files. It’s a little different to how OneNote (and Joplin) works, as they organise notes into “notebooks”.
On Android, aside from Joplin, Markor is excellent as well!
If you happen to use a Linux phone, I’ve been using Apostrophe on my pmOS Phosh device and it’s pretty good, but there are no “notebooks” or folder structure, it’s more similar to a standard text editorm It has all the markdown bits you need though, and that’s enough for me. I can just navigate to different notes via the file picker!
If you mostly make hand-written notes, Saber is awesome and can sync via Nextcloud. Plus, it’s available on desktop Linux, Android, iOS, and even mobile Linux! Very cool. Other apps exist too, like Xournal++ and Rnote.
To sync between files, I use Syncthing. It’s peer to peer and doesn’t rely on a hosted cloud service, and it’s very quick too because of this! I also my old laptop running as a little server, and it also runs Syncthing (so I can sync even with just one mobile device on)
I’ve also heard many people use Nextcloud for sync if you do need a cloud hosted services. You can decide to run NC on either a public instance, a VPS, or your own local hardware depending on your use case and technical know-how.




Some people like Obsidian too, but I find that the “vaults” make it harder to go between my different notes. It’s also closed-source unfortunately. If neither of those bother you, it’s a great option that’s super configurable with a vast plugin ecosystem!