Thursday, April 22, 2010

What are the differences between Windows and Linux?

There are many differences between Windows NT and Linux. Skipping over the obvious ones ( Windows NT is made by Microsoft, Linux has a higher server market share, etc...), probably the most interesting difference is how security is structured. Linux's basic security / permissions structure is modeled after that of older Unices. Different users are assigned different privileges, and a single "root" user can do anything. Windows NT has no "root" user, and no single account has absolute power. In theory, this makes NT more secure, since more accounts would have to be compromised to gain control of the system. In practice, a single "Administrator" account is all that is usually needed to hijack an NT system, and many Linux distributions disable the root account by default.


Windows was introduced by Microsoft in 1983, and has been the dominant Operating System available for the PC since the early-nineties. As such, Microsoft has enjoyed great financial success, and Windows has had many years and incredible fiscal resources to evolve to meet the demands of the mass-market. There is an staggeringly rich set of features here, from very explicit, step-by-step user interfaces for the first time computer user, to powerful interfaces for the computer professional, and everything in between. By contrast, Linux achieved notoriety a bit later, in the mid-nineties, with a distribution known as Redhat, and although Linux was built on more mature, stable underpinnings (Unix), it did not enjoy nearly the same marketing or development budget that Microsoft threw behind Windows. In fact, the developers of Linux are commonly credited as founding the Open Source Software movement, which is the idea that software can be made better through the free sharing of its source code. In this philosophy, programmers often volunteer their time to develop software for free, as was done with Linux, and Linux is still available for free in its more basic forms. Companies like Redhat only make money by "packaging" Linux with printed documentation, extra software utilities, and setup wizards designed to make the installation of Linux and its subsequent software packages easier. Even so, the amount of money they are able to generate this way is paltry compared to the wealth of Microsoft (which makes most company's financials look paltry). Because of this, the marketing behind Linux has been miniscule compared to that of Windows, and its lack of acceptance among less technical users reflects this. A large reason is because Windows has established a very deeply-ingrained (and some have argued unfairly controlling) relationship with PC hardware manufacturers, ensuring that almost every new PC ships with Windows installed from day one. Given that they must satisfy the demands (though perhaps less than perfectly) of the majority of novice computer users, and add to that the amount of time and money that Windows has enjoyed to make itself accessible to these users, and it is easy to see why Windows is generally regarded as superior to Linux in the area of accessibility to novices. There are graphic user interfaces (abbreviated as GUI) present for almost everything you could want to do, and there is almost always more than one way to do it. In fact, one common criticism of Windows is that so many features have been layered on top of one another over the years, that it has become an overly-complicated, almost labyrinthine user experience. By contrast, some may find Linux to be more streamlined; however, there are still many equivalent features in Windows for which Linux does not provide a GUI, and the user is forced to type textual instructions into a command-line interface, or shell. While many power users consider this a plus, it is unrealistic to demand this of novice computer users, and novice users should bear this strongly in mind. All this being said, Linux still shines brilliantly in some areas that Windows seems to consistently flounder. Because the underlying architecture of Linux is more mature, stable, and secure than Windows, Linux "crashes" and "freezes" significantly less often, and can run continuously without problems for months or even years without being "rebooted". In addition, Linux does not suffer from the same security flaws as Windows, and your chances of contracting a virus, a worm, or some other form of predatory software is much lower. On an more subjective note, I suspect that given the same time and monetary advantages as Windows, Linux might have easily developed into a superior operating system in every regard.
As it stands today, they each have pros and cons. Windows is widely accepted everywhere, boasts an enormous plethora of GUIs, and has millions of software packages that run under it. But it is buggier, less secure, and sometimes feels cavernous. Linux is solid and smooth running, and feels more stream-lined to many. But what technical users call stream-lined, novices may interpret as spare, and sometimes barren or just plain missin. There are also fewer software packages available for it currently, though many of those that are available are free. As time goes by, and the Open Software Community develops more for Linux, these differences will shrink, but until there is financially powerful, unifying force (company) behind Linux, this author thinks it is doubtful they will go away all together.

  1. Linux is a open-source OS.People can change code and add programs which will help to use your computer better. It's designed as a reaction on the monopoly position of windows. you can't change any thing in windows. you can't even see which processes do what and build your onw extension. Linux wants the programmers to extend and redesign it's OS time after time, so it beats Windows or at least is as good as windows, but whit open-source, so you can see what happens and you can edit the OS.
  2. All the flavors of Windows come from Microsoft, the various distributions of Linux come from different companies (i.e LIndows , Lycoris, Red Hat, SuSe, Mandrake, Knopping, Slackware).

  3. Linux is customizable in a way that Windows is not. For example,NASlite is a version of Linux that runs off a single floppy disk and converts an old computer into a file server. This ultra small edition of Linux is capable of networking, file sharing and being a web server.

  4. For desktop or home use, Linux is very cheap or free, Windows is expensive. For server use, Linux is very cheap compared to Windows. Microsoft allows a single copy of Windows to be used on only one computer. Starting with Windows XP, they use software to enforce this rule (activation). In contrast, once you have purchased Linux, you can run it on any number of computers for no additional charge.

  5. You have to log on to Linux with a userid and password. This is not true of Windows. Typically Windows 9x does not ask for a userid/password at boot time and, even if it does, this can be easily bypassed. In general, Windows NT, 2000 and XP do require a userid/password to log on. However Windows 2000 and XP can be configured with a default userid and password so they boot directly to the Windows desktop. Windows XP, 2000 and Linux all support different types of users. Windows XP Home Edition supports Administrator class users that have full and total access to the system and restricted users that, among other restrictions, can't install software. Windows XP Pro and Windows 2000 support additional levels of users and there are groups of system privileges that can be assigned to a particular user. In Linux, the user with full and total access is called root, everyone else is a normal user. The options for Linux security privileges don't seem to me to be as robust as in Windows 2000 and XP Pro, they are focused on files and directories (can you read, update and execute files). Linux has a concept of a group of users that Windows does not, but again the privileges associated with a group are all file/directory related.

  6. Linux has a reputation for fewer bugs than Windows.

  7. Windows must boot from a primary partition. Linux can boot from either a primary partition or a logical partition inside an extended partition. Windows must boot from the first hard disk. Linux can boot from any hard disk in the computer.

  8. Windows uses a hidden file for its swap file. Typically this file resides in the same partition as the OS (advanced users can opt to put the file in another partition). Linux uses a dedicated partition for its swap file (advanced users can opt to implement the swap file as a file in the same partition as the OS).

  9. Windows uses FAT12, FAT16, FAT32 and/or NTFS with NTFS almost always being the best choice. Linux also has a number of its own native file systems. The default file systeAll the file systems use directories and subdirectories. Windows separates directories with a back slash, Linux uses a normal forward slash. Windows file names are not case sensitive. Linux file names are. For example "abc" and "aBC" are different files in Linux, whereas in Windows it would refer to the same file. Case sensitivity has been a problem for this very web page, the name of which is "Linux.vs.Windows.html". At times, people have tried to get to this page using "linux.vs.windows.html" (all lower case) which resulted in a Page Not Found error. Eventually, I created a new web page with the name in all lower case and this new page simply re-directs you to the real page, the one you are reading now (with a capital L and W). m for Linux used to be ext2, now it is typically ext3.

  10. Windows and Linux use different concepts for their file hierarchy. Windows uses a volume-based file hierarchy, Linux uses a unified scheme. Windows uses letters of the alphabet to represent different devices and different hard disk partitions. Under Windows, you need to know what volume (C:, D:,...) a file resides on to select it, the file's physical location is part of it's name. In Linux all directories are attached to the root directory, which is identified by a forward-slash, "/". For example, below are some second-level directories: /bin/ ---- system binaries, user programs with normal user permissions /sbin --- executables that need root permission /data/ --- a user defined directory /dev/ ---- system device tree /etc/ ---- system configuration /home/ --- users' subdirectories /home/{username} akin to the Windows My Documents folder /tmp/ ---- system temporary files /usr/ ---- applications software /usr/bin - executables for programs with user permission /var/ ---- system variables /lib --- libraries needed for installed programs to run .

  11. Both support the concept of hidden files, which are files that, by default, are not shown to the user when listing files in a directory. Linux implements this with a filename that starts with a period. Windows tracks this as a file attribute in the file metadata (along with things like the last update date). In both OSs the user can over-ride the default behavior and force the system to list hidden files.

  12. Windows started with BAT files (a combination of OS commands and optionally its own language) and then progressed to Windows Scripting Host (WSH) which supports two languages, JavaScript and VB Script. Linux, like all Unix variants, provides multiple scripting languages, referred to as shell scripts. In general, the Linux scripting languages are older and cruder than WSH but much more powerful than BAT files. They tend to use special characters instead of English commands and don't support objects (this only matters to programmers). One scripting language that can run on both Linux and Windows is PHP. It always has to be installed under Windows, it may have to be installed under Linux. PHP is typically found running on Linux based web servers in combination with Apache, but it is capable of running "client side" (on your computer).

  13. Every computer printer ships with drivers for last last few versions of Windows (at the time it was manufactured). Running the printer on a very old or too new version of Windows may or may not work. Still, this a far better situation than with Linux which does not support as many printers as Windows. In an environment with many Linux users, shared network printers a tech support staff, this should not be an issue as you can limit yourself to well supported printers. Home users of Linux however, will no doubt suffer from the relatively poor support for printers.

  14. Windows allows programs to store user information (files and settings) anywhere. This makes it impossibly hard to backup user data files and settings and to switch to a new computer. In contrast, Linux stores all user data in the home directory making it much easier to migrate from an old computer to a new one. If home directories are segregated in their own partition, you can even upgrade from one version of Linux to another without having to migrate user data and settings.

Linux and NT Server 4.0

Since NT is often chosen on the basis of cost-effective hardware solutions, Linux will be the UNIX system in this comparison, for it thrives on Intel hardware. Note: Only the items/features that actually ship with each operating system are listed here. Perl 5.0, for instance, is available for all platforms, but Microsoft does not provide this with its operating systems. On the same note, most distributions of Linux ship with only about four GUIs (window managers) to choose from, yet you'll note from a previous section in this article, that this is only a small number of what is available for Linux, or any other UNIX operating system for that matter.



Windows vs. Linux Design
It is possible that email and browser-based viruses, Trojans and worms are the source of the myth that Windows is attacked more often than Linux. Clearly there are more desktop installations of Windows than Linux. It is certainly possible, if not probable, that Windows desktop software is attacked more often because Windows dominates the desktop. But this leaves an important question unanswered. Do the attacks so often succeed on Windows because the attacks are so numerous, or because there are inherent design flaws and poor design decisions in Windows?
Many, if not most of the viruses, Trojans, worms and other malware that infect Windows machines do so through vulnerabilities in Microsoft Outlook and Internet Explorer. To put the question another way, given the same type of desktop software on Linux (the most often used web browsers, email, word processors, etc.), Are there as many security vulnerabilities on Linux as Windows?

Windows Design
Viruses, Trojans and other malware make it onto Windows desktops for a number of reasons familiar to Windows and foreign to Linux:
1. Windows has only recently evolved from a single-user design to a multi-user model
2. Windows is monolithic, not modular, by design
3. Windows depends too heavily on an RPC model
4. Windows focuses on its familiar graphical desktop interface
Windows has only recently evolved from a single-user design to a multi-user model
Critics of Linux are fond of saying that Linux is “old” technology. Ironically, one of the biggest problems with Windows is that it hasn’t been able to escape its “old” legacy single-user design. Windows has long been hampered by its origin as a single-user system. Windows was originally designed to allow both users and applications free access to the entire system, which means anyone could tamper with a critical system program or file. It also means viruses, Trojans and other malware could tamper with any critical system program or file, because Windows did not isolate users or applications from these sensitive areas of the operating system.
Windows XP was the first version of Windows to reflect a serious effort to isolate users from the system, so that users each have their own private files and limited system privileges. This caused many legacy Windows applications to fail, because they were used to being able to access and modify programs and files that only an administrator should be able to access. That’s why Windows XP includes a compatibility mode - a mode that allows programs to operate as if they were running in the original insecure single-user design. This is also why each new version of Windows threatens to break applications that ran on previous versions. As Microsoft is forced to hack Windows into behaving more like a multi-usersystem, the new restrictions break applications that are used to working without those restraints.
Windows XP represented progress, but even Windows XP could not be justifiably referred to as a true multi-user system. For example, Windows XP supports what Microsoft calls “Fast User Switching”, which means that two or more people can log into a Windows XP system on a single PC at the same time. Here’s the catch. This is only possible if and only if the PC is not set up to be part of a Windows network domain. That’s because Microsoft networking was designed under the assumption that people who log into a network will do so from their own PC. Microsoft was either unable or unwilling to make the necessary changes to the operating system and network design to accommodate this scenario for Windows XP.
Windows Server 2003 makes some more progress toward true multi-user capabilities, but even Windows Server 2003 hasn’t escaped all of the leftover single-user security holes. That’s why Windows Server 2003 has to turn off many browser capabilities (such as ActiveX, scripting, etc.) by default. If Microsoft had redesigned these features to work in a safe, isolated manner within a true multi-user environment, these features would not present the severe risks that continue to plague Windows.


Linux Design
According to the Summer 2004 Evans Data Linux Developers Survey, 93% of Linux developers have experienced two or fewer incidents where a Linux machine was compromised. Eighty-seven percent had experienced only one such incident, and 78% have never had a cracker break into a Linux machine. In the few cases where intruders succeeded, the primary cause was inadequately configured security settings.
More relevant to this discussion, however, is the fact that 92% of those surveyed have never experienced a virus, Trojan, or other malware infection on Linux.
Viruses, Trojans and other malware rarely, if ever, manage to infect Linux systems, in part because:
1. Linux is based on a long history of well fleshed-out multi-user design
2. Linux is mostly modular by design
3. Linux does not depend upon RPC to function, and services are usually configured not to use RPC by default
4. Linux servers are ideal for headless non-local administration
Keep in mind when reading the summaries below that there are variations in the default configurations of the different distributions of Linux, so what may be true of Red Hat Linux may not be true of Debian and there may be even more differences in SuSE. For the most part, all the major Linux distributions tend to follow sane guidelines in the default configurations.


Linux is based on a long history of well fleshed-out multi-user design
Linux does not have a history of being a single-user system. Therefore it has been designed from the ground-up to isolate users from applications, files and directories that affect the entire operating system. Each user is given a user directory where all of the user’s data files and configuration files are stored. When a user runs an application, such as a word processor, that word processor runs with the restricted privileges of the user. It can only write to the user’s own home directory. It cannot write to a system file or even to another user’s directory unless the administrator explicitly gives the user permission to do so.
Even more important, Linux provides almost all capabilities, such as the rendering of JPEG images, as modular libraries. As a result, when a word processor renders JPEG images, the JPEG rendering functions will run with the same restricted privileges as the word processor itself. If there is a flaw in the JPEG rendering routines, a malicious hacker can only exploit this flaw to gain the same privileges as the user, thus limiting the potential damage. This is the benefit of a modular system, and it follows more closely the spherical analogy of an ideally designed operating system (see the section Windows is Monolithic by Design, not Modular).
Given the default restrictions in the modular nature of Linux; it is nearly impossible to send an email to a Linux user that will infect the entire machine with a virus. It doesn’t matter how poorly the email client is designed or how badly it may behave - it only has the privileges to infect or damage the user’s own files. Linux browsers do not support inherently insecure objects such as ActiveX controls, but even if they did, a malicious ActiveX control would only run with the privileges of the user who is running the browser. Once again, the most damage it could do is infect or delete the user’s own files.
Even services, such as web servers, typically run as users with restricted privileges. For example, Debian GNU/Linux runs the Apache server as the user www-data, who belongs to a group with the same name, www-data. If a malicious hacker manages to gain complete control over the Apache web server on a Debian system, that hacker can only affect files owned by the user www-data, such as web pages. In turn, the MySQL SQL database server often used in conjunction with Apache, runs with the privileges of the user mysql. So even if Apache and MySQL are used together to serve web pages, a malicious hacker who gains control of Apache does not have the privileges to exploit the Apache hole in order to gain control of the database server, because the database server is “owned” by another user.
In addition, users associated with services such as Apache, MySQL, etc., are often set up with user accounts that have no access to a command line. So if a malicious hacker somehow breaks into the MySQL user account, that hacker cannot exploit that vulnerability to issue arbitrary commands to the Linux server, because that account has no ability to issue commands.
In sharp contrast, Windows was originally designed to allow all users and applications to have administrator access to every file on the system. Windows has only gradually been re-worked to isolate users and what they do from the rest of the system. Windows Server 2003 is close to achieving this goal, but the methodology Microsoft has employed to create this barrier between user and system is still largely composed of constantly changing hacks to the existing design, rather than a fundamental redesign with multi-user capability and security as the foundational concept behind the system.