Recs.
Updated
Free to use, open source operating system, available in a wide variety of flavours/distributions.
SpecsUpdate
Pros
Pro Powerful command line
Superior set of built-in utils that are well documented and are designed for command-line use. A big range of command-line shells and shell script languages (commonly bash) are on their own powerful enough to create simple programs.
Pro Almost free and open source kernel
Linux is an OS assembled under the model of free and open-source software development and distribution.
Pro Powerful tools
When it comes to industry standard development tools (non environments, tools!) Linux has you covered more than OSX and way more than Windows (although Win10+Ubuntu Shell is a very clever solution).
Pro Easy to try out/install and use
Live CD distros make it simple for anyone try out first and install. Package managers make finding and installing software a painless process. Most popular desktop environments (Mate, Cinnamon, KDE, etc..) are just as easy to learn and more powerful than Windows or MacOS. A developer can get up and running quickly and easily with plenty of excellent free and open source tools.
Pro Powers most web servers, mobile phones, and portable devices
This means that what one learns is relevant for more systems / devices.
Pro Nearly all single board computers' OS are Linux based
If you want to program a Raspberry Pi or any other such small computer, it'll very likely be running a Linux OS. You can not only transfer knowledge but also use it to code or control hardware.
Pro Compiles faster
Compiling codes in Linux is very fast compared to Windows. In Linux, compiling a "Hello World" in C or C++ takes only about 0.1 seconds! On Windows, it takes about 1 or 2 seconds just to compile a "Hello World" in C or C++.
Because UNIX file system base on tree data structure, while Windows is implemented in master file table.
Pro Dev tools almost always support Linux or are developed specifically for Linux
Because Linux is the main OS for WRT servers, supercomputers, mobile, and embedded systems, most tools you need to develop in this day and age are readily available on Linux. Some work even better on Linux than any other system (e.g. Docker).
Cons
Con Issues with drivers if your hardware is not officially supported
Some hardware maker is not support all Linux distros or not support Linux. NVIDIA is example, their driver is too bad if compare with AMD Linux driver. Other network hardware also has a problem driver.
Con Difficult to develop for iOS and OSX devices on Linux
However, it is possible to make the process more streamlined by cross-compiling.
Con If you're not an every-day user and/or are new to the platform, you will likely spend as much of your time managing the Operating System as you will learning the programming language of choice
I love GNU/Linux. I've been running it since I was in middle school, and have been a professional developer for over a decade at this point in my career.
But I would never, as a default position, recommend Linux to someone if they came to me and asked "what is the best platform to learn to program on." Why? Because unless there is something inherent to the language desired to be learned that requires Linux, I don't understand why you're going to off the bat increase the learning curve for the aspiring programmer.
Are the basics of the shell useful to know? Absolutely. Are *nix-based systems huge players in the web world, and programming in general? Without a doubt.
But none of that is required to learn a language, and I don't find throwing as many variables at a novice learner helpful. If, down the road, the coder needs to learn bash, or setting up device drivers on a *nix system, or how to work a package manager (all useful, don't get me wrong), then I'm sure they will.
But frankly it's a waste of time to throw this operating system at people who don't need it. I am not a philosophical fan of Microsoft, Linux Is My Desktop (tm), but this idea that we should just throw every young programmer onto a Linux box is ridiculous, and pushed by ideology more than it is practicality.
Unless they end up deep in macOS/iOS or Windows-specific programming, chances are they will find their way to linux eventually. Many do, if for no other reason than a coder's innate love of tinkering and the attractive philosophy behind open-source projects.
But let's stop with the farce.
Con Not a system for everyone
If you're looking to have control over your system at all costs, including the effort it takes to learn the system, then look no further. If you're an everyday computer user, with no technical affinity whatsoever, move along. Linux assumes you - as a user - have some technical understanding.
Con Most of professional proprietary software is not available for Linux
There are often free alternatives to popular software applications; however, if you need a specific application, such as Adobe Photoshop, you may be out-of-luck (without running another operating system inside a virtual machine or dual-booting with another operating system). Also many (especially older) dedicated applications to drive hardware (like a laser cutter for example) may be available only on certain platforms like Windows or OS X.
Con If Linux came to dominate desktop, development software would become a nightmare
Because too much variants of Linux distros mean developer will support more distros. More bugs, more performance issue. Look at Android (Linux of mobile), lack of quality app, worse performance on low device, app crash too much because OEM modified firmware too much. That why iOS always has better app support.
Con Drivers for the latest hardware might not be available
Hardware manufacturers often don't provide drivers for Linux. Drivers for the latest or less popular hardware are often missing or support only limited functionality.
Con Has Mac OS development via cross compile but not official
For creating OSX applications, native environments have more suitable tools and are better suited to the task.
Con UX and overall user friendliness is not quite there yet
Having to deal with things such as buggy drivers, broken package managers, and application software with very poor design decisions, like unlinking a bunch of files without so much as a prompt to the user, can make Linux distributions a real pain.
Such issues occur on distributions like Ubuntu and Elementary OS and even further issues can occur when trying to switch distributions, such as broken ACPI modules due to using wrong versions of the kernel. These issues just scratch the surface of the frustration that one can experience due to the poor UX of most Linux distributions.
There is a good blog series by a fellow software developer, Bozhidar Batsov, which goes into more detail about these types of problems on Linux. See here, here, and here for relevant blog posts.
Linux operating systems are generally stable at a technical level and good for having fine-grained control over one's system. They can also be very educational for the user during their first experience with the system. However, they are typically quite demanding in terms of time for people who expect a wide range of applications and other basic, user-oriented aspects of their operating system to just work and who don't have time to dicker with their system on a day-to-day basis.
Recommendations
Comments
Flagged Pros + Cons
Pro Sometimes it "just works"
Sometimes Linux tends to just work with little to no effort or troubleshooting required. Most of the times it doesn't, though.
Con Requires some programming knowledge
Although very dynamic by nature, linux is on the more technical end of the OS spectrum, and typically requires that the user already have some skill when it comes to programming.