Why are beginners often advised to learn linux?

Well, for one thing, the bare bone basics of the OS are not very different from Windows, so a pure beginner can pickup Linux and more or less use it as well as they could use Windows. I'm referring to the generate navigation of the OS and running programs within it. Most beginners probably aren't familiar with how Windows does things like syscalls or the terminal, anyway.

So, why Linux?

  1. Better terminal and shells. Beginner programmers for most languages will be writing console programs, so a strong terminal and shell is very useful here. And IMO, a beginner programmer should learn the basics of a terminal and shell before they learn to program.

  2. Comes with everything many programmers need. With Windows, you gotta install the compiler and such first. For Linux, some of the most popular languages are basically "ready to go". For example, GCC and G++ are preinstalled in every Linux distro I've seen, making it easier to jump into developing with those languages. You can focus on learning to program and not on installing dependencies.

  3. Speaking of dependencies, the package manager that many Linux distros have (particularly apt-get) makes it easy to get tools for other languages. Want to learn Python? apt get install python3 and you're ready to go.

  4. Some would argue that Linux makes interacting with the OS easier. I'm not so sure about this. The Windows API is quite extensive and often higher level than the POSIX standard that Linux follows. Although being POSIX compatible means that you can use the same code for many OSes. Heck, certain versions of Windows are even POSIX compliant (I have no idea why Microsoft has decided to hide this in the "regular people version" of Windows).

  5. Let's be honest: a large reason for people to advocate Linux is because they support the free and open source software movement, of which Linux is a marvelous flagship of. It's a piece of FOSS that is so crucial that companies even pay people to develop for it and it's used for personal and commercial use worldwide. Many programmers identify strongly with this ideology, so advocate Linux.

  6. Linux is made by programmers with other programmers in mind. This is really distro dependent. Some are more dumbed down than others. But most of them afford the user more customization and choice than Windows or OS X. For example, Windows thinks that you shouldn't be able to change file extensions without a warning. There's no way to disable this warning. This is obviously a feature for less technical users who don't understand file extensions and accidentally changing the extension would likely result in them being unable to open the file. Most halfway technical people don't have this problem, and this isn't a "feature" I've seen in any Linux distro.

There's other advantages of Linux, but I would think that these are the biggest ones for why someone would advocate Linux to beginners. I think #5 is probably the strongest point for most people. After all, Windows has PowerShell to combat point #1. Point #2 is quite minor (you only set things up once and there's no guarantee that you're in developing in one of these languages). Point #3 is remedied by some third party Windows package managers. #4 doesn't apply to the POSIX compatible versions of Windows (off the top of my head, I know Win 7 Ultimate is). And #6 is more for experienced programmers than beginners.

/r/learnprogramming Thread