Sometimes I fantasize about a platform for tutorials on "how to do X using Y if you know Z" where prerequisites would be linked wiki-style, but disambiguated for the learner. If they are on Windows and use cmd.exe as their shell, command-line examples would be adapted to that, while someone using bash on Linux would get fitting examples as well. If they already know how to do a part, they get just a short summary instead of lengthy explanations.
Unfortunately, you'd need a lot of content before something like that would take off, and just specifying a few options while otherwise relying on the reader to figure out any differences is simply easier for a writer and still good enough for most learners.