And not to forget LogSeq (https://logseq.com) which is often mentioned in a row with the above and somehow the new kid in town. Works with local markdown files but lives in your browser (so useful even in environment with low privileges). Allows linking and querying notes and blocks swiftly.
* Foam - https://github.com/foambubble/foam
* Dendron - https://github.com/dendronhq/dendron
Obsidian is great as well, but there are caveats that may make it not so great with your preferences