A lot of people ask me why I prefer to use Linux instead of Microsoft Windows. I use Linux for both desktop and server roles, and I’ve often seen other blog posts mention reasons for preferring Linux over Windows, but they never seem to list the same reasons I think of when asked. I’ve decided to make my own list, and leave out the reasons most people give ( lack of viruses, better security, package managers, free etc ).
Terms, Conditions and Limitations
Windows obviously costs money ( I don’t think this is particularly relevant for this post – even if Windows was free I wouldn’t change that it doesn’t do what I need an OS to do ), but why can’t they just take your money, supply the software, and let you do what you want with it? I don’t see why it’s Microsoft’s concern what I do with it once I’ve purchased the software. By all means they can charge more money for different versions, but they should differentiate the products with different features rather than dictate what the software may be used for or how many users can use it.
Some interesting parts from the Windows 7 Home Premium Edition license ( warning: PDF ):
c. Number of Users. Unless otherwise provided in these license terms, only one user may use the software at a time on the licensed computer.
Multiplexing. Hardware or software you use to pool connections, or reduce the number of devices or users that directly access or use the software (sometimes referred to as “multiplexing” or “pooling”), does not reduce the number of licenses you need.
Only one person may use the software ( Windows ) at once – so I’m not allowed to use software which allows multiple keyboards, mice and displays to allow multiple users to use the computer. Here is a Linux Live CD which does this, or the software can be installed onto almost any Linux distribution.
Device Connections. You may allow up to 20 other devices to access software installed on the licensed computer to use only File Services, Print Services, Internet Information Services and Internet Connection Sharing and Telephony Services.
Media Center Extender. You may have five Media Center Extender sessions (or other software or devices which provide similar functionality for a similar purpose) running at the same time to display the software user interface or content on other displays or devices.
Another pointless set of restrictions about what the software can do, there is no technical reason for this, just greed from Microsoft’s part (presumably they want you to upgrade to a different version to increase these limits). It’s interesting that the limit of 5 Media Center Extender sessions is extended to “software
or devices which provide similar functionality for a similar purpose”. So this would mean installing software like Coherence and using it to stream to more than 5 devices would violate the license.
Unless the software is activated, you have no right to use the software after the time permitted for activation.
Why not? If I’ve paid for a legitimate Windows License, Microsoft has no reason to demand I activate the software.
These silly limits are not limited to the home editions of Microsoft software, see here for varying limits on maximum RAM, network connections, and CPU sockets. It’s interesting to note that “Remote Desktop Admin Connections” is limited to 2 on all editions. What if I have an emergency and 3 admins need to connect at once to help diagnose the problem?
SSH, remote administration and multiple user login
As part of my day job, I am part of a team which maintains our Linux-based ( mostly CentOS and Fedora based ) servers. We often ask ourselves how ( or if ) we would maintain the servers running Windows. Our network can be slow at times, and we suspect that Remote Desktop wouldn’t function during the worst periods, and SSH being text-based is very low on bandwidth usage, as well as processor usage from both ends.
Obviously an OpenSSH server can be installed on a Windows machine, and I’m sure you could connect fine, and probably do some admin tasks, there doesn’t seem to be a version of ‘screen’ that will run within cmd.exe or powershell, making doing anything serious over the network risky at best ( and some things aren’t even possible – how do you go about installing software from the command line on Windows? Some might have a command line installation mode, but you can’t rely on the authors including this option – on Linux you can ).
We also frequently have multiple users logged into the same machine remotely at once – Remote Desktop would increase the load on the machine, spawning a whole new GUI interface for each concurrent user isn’t going to be particularly light, and costly ( to have the 4 concurrent users we sometimes have we would need a lot of licenses – each user might want 3 connections open to do 3 different tasks ).
SSH also has other advantages, like allowing tunneling of connections ( so you can firewall off Postgresql from the outside world, and tunnel through the machine to access it ), X-forwarding, SFTP and other features.
Another thing I love about *nix is the ability to easily script things. For example I have two Linux machines next to each other, and if I want to play a video on the machine furthest away from me, I simply right-click a video file and select ‘Play on other machine’, which runs a script which simply does:
ssh othermachine DISPLAY=":0" mplayer <path to video>
A terminal appears on the machine I am using, and I can pause, play, stop, mute etc the video without moving across the room. I’ve got key authentication setup so it doesn’t even prompt for a password. Something this simple isn’t in anywhere close as simple to setup on Windows. I’ve also got other scripts to do simple things like scan 4 partitions and symbolically link the contents into a directory called ‘allvideo’. It’s one line of script and runs every time the machine boots. It took literally 2 minutes to create and test the script. Simple.
Another feature of Linux I use daily is symbolic links. If I’m running low on disk space on one partition, I can move a directory from it onto another partition, and create a symlink from the old path to the new, and expect everything to work. It will work across network drives, separate partitions, any filesystem, and is quick and easy to setup.
The nearest Windows has is NTFS junction points , which as the name suggests only works on NTFS partitions, or network drives which explicitly must support it. Prior to Windows Vista they also sound very unsafe to use.
Filesystems and mount options
On Windows, the only real filesystem choices you have is NTFS or various versions of FAT. FAT doesn’t support most functions a modern filesystem should provide, so you’re stuck with NTFS. Under other operating systems, you can decide from a range of filesystem is appropriate to use for your requirements.
For example if you expect to store thousands of small files, you could use ReiserFS, as benchmarks show it performs better than other choices under those conditions, and fiddle with the mount options to optimize for your specific workload, using mount options. You might decide that you want to retain file access time recording on your main system drive, but disable it on a specific disk. It is impossible to do this on Windows, and one line in a config file under Linux.
The standard Linux firewall, IPTables allows for huge amounts of configuration, you can filter based on the usual things you would expect, like packet types, port numbers etc, but you can also filter on hundreds of other parameters, like the local user account packets have originated from – this gives you the flexibility to introduce clever things, like limiting a certain user account to connecting to specific IP ranges, while allowing other users access globally. There doesn’t seem to be anything on Windows which can do this.
Due to the open source nature of Linux, there are thousands of different distributions you can choose between, but irrelevant of that, the actual software within a specific Linux install can be changed around as required.
As with filesystems mentioned previously, there are literally hundreds of things that you are stuck with what Microsoft gives you under Windows, you can customize completely under Linux.
Don’t want Gnome? Remove it and install KDE, or LXDE, or any of the hundreds of different desktop environments. Run without a GUI if you want ( no point wasting resources on a tiny cloud machine like an EC2 micro instance for example ). Want to remove all the drivers except the ones you actually need? Not a problem, the options are a kernel compile away. Dislike the system logger? Throw it out and put another one in, or even run without one completely. Noticed your application reads and writes to a huge number of ( but tiny ) files? Create a ramdisk and symlink it the old path to it and you might gain 1000% performance for the sake of 64MB of RAM.
Most problems in a Microsoft server environment seem to be solved by throwing money at the problem – Web sites running too slow? Buy faster hard disks. Need DDOS protection? Throw a ( usually *nix based ) firewall in front of it. This might be fine if you have your own physically hosted servers, but with the increasing prevalence in cloud hosting like Amazon EC2, this won’t be feasible. You’re stuck with running on the same hardware as everybody else, and you can’t upgrade specific components, or throw more equipment into the network.
In a cloud environment, you can upgrade the whole machine ( with exponential costs ), add more machines, and very little else. This is where Windows and it’s lack of choices will cause problems, and where the flexibility Linux paired with intelligent admins shine.
The fact that the Linux kernel powers my phone, my desktop machine, the EC2 amazon instance hosting this site and the world’s largest supercomputers is just one example of how flexible it is.