I tried linux for a while but in the end it just was too much work.
I tried Windows for about 20 years but in the end it just was too much work.
Less snarkily, part of the point of languages like Java, Ruby and Python is that, with a modicum of care, you can write programs which run on Windows, Linux and OS X (and BSD and...).
Even graphical user interfaces can carry over from one system to another. My own experience of this is fairly limited though, just a small Java program which displays a few dialog boxes which I developed (and even complied) under Linux though its production use is under Windows. (Mildly amusingly, it's invoked by a VB 3 program which I originally wrote in the early 1990s and have most recently fiddled with under Wine.)
For simple command line programs the main thing to take care of is the different formats of file names, e.g., '/' vs '\' as a separator. Python, for example, has utilities to deal with most of this; if you remember to use them then you don't have to worry about these differences. E.g., path.join('a', 'b') gives 'a/b' on Linux (and, I assume, OS X) but 'a\b' on Windows. Similarly, if you pass the right modes to file open functions the libraries deal with the differences between line endings (carriage return, line feed on Windows, just line feed (often called newline in the context) on Linux/OS X).