taking online courses

Tobik is correct, "it all depends" - Back in the day they sometimes used Java. I'd think that'd be deprecated, but some of these places hold onto things ...
Depends on the course and what extra software they make you use. In general Coursera works fine.
I do all of my Coursera and edX coursework, as well as youtube and vimeo videos, from FreeBSD with Firefox and it works perfectly. I only boot into linux :< to watch netflix movies. Linux (Ubuntu LTS) occasionally has freezes. I've never had a crash/freeze/lockup/glitch while running Gnome or Fluxbox on FreeBSD 10 or 11, so much prefer to do my work from FreeBSD.

If you're doing computer science work the only reason I can recall for needing Linux was to run the Mozart2 programming language for the great "Paradigms of Computer Programming" course on edx. I did get mozart running in VirtualBox on FreeBSD but failed to build a native ide from the mozart git repo. (Mozart has an ugly build system with poor documentation but it sure would be nice if someone would port it for FreeBSD!). Mozart is really only needed as a learning environment but it is needed to work you way through the very important compsci book "Concepts, Techniques, and Models of Computer Programming" by Peter Van Roy.