Several people advise MusicXML here but I don't see that making sense. That is an exchange format, not a format to write music in. In practice, MusicXML export/import works rather tepidly between different applications.
I've seen "TuxGuitar" mentioned but the name would strongly suggest a focus on guitar I don't see in question or tags.
LilyPond is a rather good general-purpose free typesetter available for a plethora of operating systems. You'll likely want to employ the Frescobaldi editor for entry. LilyPond has plain text input: if you can get warm with that, it is a rather efficient use of your typewriting skills. Midi input is not really workable, MusicXML cannot be exported, MusicXML import is shaky at best. Midi export is good, PDF is excellent. If you want to share work with others, letting them work with anything but LilyPond is not realistic. LilyPond is the proverbial 500lb gorilla of free music typesetting. If you can get used to its workflows, you'll never need to look anywhere else.
Denemo is a GUI entry application with its own file formats and employing LilyPond as backend. It has Midi entry capabilities and I think that it has its own MusicXML import/export strategies. No idea about their quality. Since it has its own file format, smooth cooperation with others again makes it a good idea if they use it as well. No idea whether the chances of exchanging via MusicXML (for Finale/Sibelius) are better here.
There is also MuseScore, another graphical application that does its own typesetting. I think they have given up on offering LilyPond export by now. Its the main "competition" to LilyPond in the free typesetting applications since Denemo is more of a "coopetition". I think it has a pretty large user base as well.