Operating System (OS)
An operating System is a software, which interacts with the hardware of the computer in order to manage and direct computer resources. The basic objective of an operating system is to maximise productivity of a computer system by operating it in the most efficient manner. An operating system can manage a computer system in various modes i.e. batch processing mode; time-sharing mode or real time mode. Linux and Windows are two common operating systems.
An operating System is a software, which interacts with the hardware of the computer in order to manage and direct computer resources. The basic objective of an operating system is to maximise productivity of a computer system by operating it in the most efficient manner. An operating system can manage a computer system in various modes i.e. batch processing mode; time-sharing mode or real time mode. Linux and Windows are two common operating systems.
The main difference between the two are discussed as under:
1. Versions: Both Windows and Linux come in many versions. All the versions of Windows come from Microsoft Inc., USA, the various distributions of Linux come from different companies i.e. Lindows, Lycoris, Red Hat, SuSE, Mandrake, Knoppix and Slackware. Windows has two main lines: "Win9x", which consists of Windows 95, 98, 98 second edition and Me, and "NT class" which consists of Windows NT, 2000 and XP. The versions of Linux are referred to as distributions (often shortened to "distros"). All the Linux distributions released around the same timeframe will use the same kernel. Both Linux and Windows come in desktop and server editions.
2. Graphical User Interface: Both Linux and Windows provide a GUI and a command line interface. The Windows GUI has changed from Windows 3.1 to Windows 95 (drastically) to Windows 2000 (slightly) to Windows XP (fairly large) and is slated to change again with the next version of Windows (Code name: Longhorn). Linux typically provides two GUIs, KDE and Gnome. Of the major Linux distributions, Lindows has made their user interface look more like Windows than the others.
3. Text Mode Interface: This is also known as a command interpreter. Windows users sometimes call it a DOS prompt. Linux users refer to it as a shell. Each version of Windows has a single command interpreter, but the different flavors of Windows have different interpreters. In general, the command interpreters in the Windows 9x series are very similar to each other and the NT class versions of Windows (NT, 2000, XP) also have similar command interpreters. Linux, like all versions of Unix, supports multiple command interpreters, but it usually uses one called BASH (Bourne Again Shell). Others are the Korn shell, the Bourne shell, ash and the C shell (pun, no doubt, intended).
4. Cost: 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. In contrast, once one has purchased Linux, one can run it on any number of computers for no additional charge.
5. Bugs: All software has and will have bugs (programming mistakes). Linux has a reputation for fewer bugs than Windows, but it certainly has its fair share. This is a difficult thing to judge and finding an impartial source on this subject is also difficult. The difference in OS development methodologies may explain why Linux is considered more stable. Windows is developed by faceless programmers whose mistakes are hidden from the outside world because Microsoft does not publish the underlying code for Windows. They consider it a trade secret. In contrast, Linux is developed by hundreds of programmers all over the world. They publish the source code for the operating system and any interested programmer, anywhere in the world can review it.
6. Software restrictions: A program written for Linux will not run under Windows and vice versa. This is the rule, but there are a fair number of exceptions. The most ambitious exceptions allow for installing one operating system under another. For example, on a computer running Linux (referred to as the host or native OS), one can install a copy of Windows (referred to, in this case, as the guest OS). In the Windows OS running under Linux, one can install any and all Windows programs.
7. Hardware devices supported by the OS: More hardware works with Windows than works with Linux. This is because hardware vendors write drivers for Windows more often than they do for Linux. When Windows XP came out however, many existing peripherals would not work with it because XP required new drivers and the vendors had little motivation to write drivers for old hardware.
8. Hardware the OS runs on: Linux runs on many different hardware platforms, not so with Windows. For example, Windows NT used to run on MIPS CPUs until Microsoft changed their mind. It also used to run on Alpha CPUs, again, until Microsoft changed their mind. No one gets to change their mind with Linux. It runs on a very wide range of computers, from the lowest of the low to the highest of the high. The supported range of computers is all but stunning. Because of its ability to run without a GUI, Linux can run on very old personal computers, 486 based machines for example. On the high end, Linux runs natively on IBM mainframes (the Z series) and on other high end IBM servers. On the small side, Debian Linux can run on a computer the size of a deck of playing cards (100mm by 55mm) with an ARM cpu. IBM's upcoming family of "Blue Gene" supercomputers, which will be used by Lawrence Livermore National Laboratory for nuclear weapons simulations, will run on Linux. Sony and Matsushita (parent company of Panasonic) will use Linux to build increasingly 'smart' microwave ovens, TVs and other consumer gizmos. Likewise MontaVista Software will release a version of its embedded Linux for use in consumer electronics devices. NEC is working on Linux-based cell phones and Motorola is going to make Linux its primary operating system for smart phones.
9. Multiple Users: Linux is a multi-user system, Windows is not. That is, Windows is designed to be used by one person at a time. Databases running under Windows allow concurrent access by multiple users, but the Operating System itself is designed to deal with a single human being at a time. Linux, like all Unix variants, is designed to handle multiple concurrent users. Windows, of course, can run many programs concurrently, as can Linux. There is a multi-user version of Windows called Terminal Server but this is not the Windows pre-installed on personal computers.
10. Networking: Both uses the TCP/IP. Linux can do Windows networking, which means that a Linux computer can appear on a network of Windows computers and share its files and printers.
11. Hard disk partitions: 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.
12. Swap files: 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).
13. File Systems: Windows uses FAT12, FAT16, FAT32 and NTFS. Linux also has a number of its own native file systems. The default file system for Linux used to be ext2, now it is typically ext3. File systems can be either journaled or not. Non-journaled systems are subject to problems when stopped abruptly. All the FAT variants and ext2 are non-journaled. After a crash, they should be examined by their respective health check utilities (Scan Disk or Check Disk or fsck). In contrast, when a journaled file system is stopped abruptly, recovery is automatic at the next reboot. NTFS is journaled. Linux supports several journaled file systems: "ext3", "reiserfs" and "jfs". All 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. As for crossing over, Linux can read/write FAT16 and FAT32. Some Linux distributions can read NTFS partitions, others can not. No version of Linux can write to NTFS. On its own, Windows can not read partitions formatted with any Linux file system.
14. File Hierarchy: 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, one needs 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
5. Bugs: All software has and will have bugs (programming mistakes). Linux has a reputation for fewer bugs than Windows, but it certainly has its fair share. This is a difficult thing to judge and finding an impartial source on this subject is also difficult. The difference in OS development methodologies may explain why Linux is considered more stable. Windows is developed by faceless programmers whose mistakes are hidden from the outside world because Microsoft does not publish the underlying code for Windows. They consider it a trade secret. In contrast, Linux is developed by hundreds of programmers all over the world. They publish the source code for the operating system and any interested programmer, anywhere in the world can review it.
6. Software restrictions: A program written for Linux will not run under Windows and vice versa. This is the rule, but there are a fair number of exceptions. The most ambitious exceptions allow for installing one operating system under another. For example, on a computer running Linux (referred to as the host or native OS), one can install a copy of Windows (referred to, in this case, as the guest OS). In the Windows OS running under Linux, one can install any and all Windows programs.
7. Hardware devices supported by the OS: More hardware works with Windows than works with Linux. This is because hardware vendors write drivers for Windows more often than they do for Linux. When Windows XP came out however, many existing peripherals would not work with it because XP required new drivers and the vendors had little motivation to write drivers for old hardware.
8. Hardware the OS runs on: Linux runs on many different hardware platforms, not so with Windows. For example, Windows NT used to run on MIPS CPUs until Microsoft changed their mind. It also used to run on Alpha CPUs, again, until Microsoft changed their mind. No one gets to change their mind with Linux. It runs on a very wide range of computers, from the lowest of the low to the highest of the high. The supported range of computers is all but stunning. Because of its ability to run without a GUI, Linux can run on very old personal computers, 486 based machines for example. On the high end, Linux runs natively on IBM mainframes (the Z series) and on other high end IBM servers. On the small side, Debian Linux can run on a computer the size of a deck of playing cards (100mm by 55mm) with an ARM cpu. IBM's upcoming family of "Blue Gene" supercomputers, which will be used by Lawrence Livermore National Laboratory for nuclear weapons simulations, will run on Linux. Sony and Matsushita (parent company of Panasonic) will use Linux to build increasingly 'smart' microwave ovens, TVs and other consumer gizmos. Likewise MontaVista Software will release a version of its embedded Linux for use in consumer electronics devices. NEC is working on Linux-based cell phones and Motorola is going to make Linux its primary operating system for smart phones.
9. Multiple Users: Linux is a multi-user system, Windows is not. That is, Windows is designed to be used by one person at a time. Databases running under Windows allow concurrent access by multiple users, but the Operating System itself is designed to deal with a single human being at a time. Linux, like all Unix variants, is designed to handle multiple concurrent users. Windows, of course, can run many programs concurrently, as can Linux. There is a multi-user version of Windows called Terminal Server but this is not the Windows pre-installed on personal computers.
10. Networking: Both uses the TCP/IP. Linux can do Windows networking, which means that a Linux computer can appear on a network of Windows computers and share its files and printers.
11. Hard disk partitions: 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.
12. Swap files: 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).
13. File Systems: Windows uses FAT12, FAT16, FAT32 and NTFS. Linux also has a number of its own native file systems. The default file system for Linux used to be ext2, now it is typically ext3. File systems can be either journaled or not. Non-journaled systems are subject to problems when stopped abruptly. All the FAT variants and ext2 are non-journaled. After a crash, they should be examined by their respective health check utilities (Scan Disk or Check Disk or fsck). In contrast, when a journaled file system is stopped abruptly, recovery is automatic at the next reboot. NTFS is journaled. Linux supports several journaled file systems: "ext3", "reiserfs" and "jfs". All 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. As for crossing over, Linux can read/write FAT16 and FAT32. Some Linux distributions can read NTFS partitions, others can not. No version of Linux can write to NTFS. On its own, Windows can not read partitions formatted with any Linux file system.
14. File Hierarchy: 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, one needs 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
Every device and hard disk partition is represented in the Linux file system as a subdirectory of the lone root directory. For example, the floppy disk drive in Linux might be /etc/floppy. The root directory lives in the root partition, but other directories (and the devices they represent) can reside anywhere. Removable devices and hard disk partitions other than the root are attached (i.e., "mounted") to subdirectories in the directory tree. This is done either at system initialization or in response to a mount command. There are no standards in Linux for which subdirectories are used for which devices. This contrasts with Windows where the A disk is always the floppy drive and the C disk is almost always the boot partition.
15. Hidden Files: Both operating systems 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.
16. User Data: 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, one can even upgrade from one version of Linux to another without having to migrate user data and settings.
17. Shutting Down: Both operating systems have to be told to shut down One shuts down Windows through the Start button, then selecting Shutdown. In both the KDE and Gnome GUIs for Linux, one can shut the system down by first logging out (equivalent to logging off in Windows). Further, Linux can also be shut down from a command prompt using the shutdown command. The shutdown command can either shut the system down immediately or be told to shut down at some time in the future, an option not available in Windows.
15. Hidden Files: Both operating systems 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.
16. User Data: 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, one can even upgrade from one version of Linux to another without having to migrate user data and settings.
17. Shutting Down: Both operating systems have to be told to shut down One shuts down Windows through the Start button, then selecting Shutdown. In both the KDE and Gnome GUIs for Linux, one can shut the system down by first logging out (equivalent to logging off in Windows). Further, Linux can also be shut down from a command prompt using the shutdown command. The shutdown command can either shut the system down immediately or be told to shut down at some time in the future, an option not available in Windows.