View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > FAQ - operating systems

From LQWiki

Jump to: navigation, search

Subtopic of Common Questions and Misconceptions

Contents

FAQ - operating systems

Operating systems - General

Q: What makes Linux different from Microsoft Windows or Mac OS?

A: Linux is unique because of several things:

  • It is freely available to all. The word Free in the context of GNU, Linux, Free Software and Open Source software usually means two things: free as in cost, and/or free as in freedom. See a later question for what the difference is, and why that's important. Linux, and all the software you get with it, are usually free in both senses of the word. When you do pay for them, they are still free as in freedom, and you get get extras such as a boxed product, warranties, and service for your money.
  • It is created and developed not by a large corporation, but by enormous communities of people from all over the world. Most are volunteers and provide their skills and time for free. Some (including some of the contributors to this site) are paid to work on it. It's been estimated that on a typical modern Linux distribution DVD you get software equivalent to many hundreds of thousands of US dollars. Linux is community driven and not subject to centralised control. Therefore Linux moves with the interests of those who use it.
  • It is a credible alternative to Microsoft Windows. While there are several operating systems available for servers, there are only 3 mainstream systems for the home/desktop user market - Microsoft Windows, the Apple Macintosh, and Linux. Microsoft is reported to have approximately 90%+ market share. Apple has only survived by selling high-margin hardware to the boutique market. Meanwhile, almost every other proprietary OS that runs on common PC hardware has been wiped out. Only Linux has survived in the mainstream.

Q: Is Linux the only Open Source operating system?

No. Linux is surely the most widely distributed and supported open source OS, but there are a few other free systems available. Most of them are Unix-like (like Linux), so once you are accustomed to Linux, you can expect to feel reasonably at ease with these operating systems.

See Open source operating systems for more detail.


Q: What is the relationship of Linux and UNIX/Unix?

A: This is an extremely complicated question that confuses many people new to the *nix world. You don't need to understand it in order to use and enjoy Linux, but if you're interested here goes.

Historically, Unix was developed at Bell Labs in the late 60s, though it didn't really come into its own until development through the 70s. Originally, it was just an experiment on the part of the authors - Dennis Ritchie, Ken Thompson, Brian Kernighan, et al - that attained a sort of acceptance at Bell and excited the academic community.

As Bell was originally forbidden to sell operating systems due to monopoly issues, it was originally distributed in the form of source code on tapes and, the story goes, often with a note saying "Love, Ken [Thompson]". So it was proprietary in the sense that Bell owned it, but open source in the sense that people could see and modify the code. Over the course of time, it became more and more popular (and thus potentially more and more profitable). When Bell (AT&T) was broken up, the legal obstruction to selling Unix was removed. Several different companies developed their own versions of Unix which became increasingly less interoperable and further redistribution of the source code (or any distribution of new code) was forbidden.

Meanwhile, Microsoft and IBM came up from underneath, with the DOS-driven PC, which had a closed-source and proprietary operating system from the start. Through the course of the 80s, Unix faltered due to the beginnings of the shift from mainframes and minicomputers to PCs and due to commercial rivalries between the Unices. And, through the course of the 80s, the FSF movement rose. In reaction to the failures of closed source Unix (though actually sparked by the issues of a different operating system) Richard Stallman (usually known as RMS) started the GNU project in 1984: GNU being a recursive acronym meaning "GNU's Not Unix" which also takes the frequent Unix-ism of paradox. The only reason it's worth saying that GNU's not Unix is because it is. And it isn't.

The essence of this is the source code issue. GNU tools were coded from scratch and the code was Free Software. So it was not Unix because it had a different codebase. But it was Unix in that the tools usually had the same name, operated the same way, and could interoperate with proprietary Unix to an extent. They also had GNU extensions which gave them more capabilities than the Unix originals.

Just like a generic PC is a "clone" of the IBM PC - different stuff made by different people that does much the same thing and often better and cheaper - so GNU was intended to be a "clone" of Unix. The one thing they didn't have was a kernel. So, in a sense, they had nothing. One could not boot or run a GNU machine - only run GNU tools on some other (usually proprietary) system much as DJGPP can run on DOS or Cygwin can run on Windows now.

Enter the early nineties. As early Unix was fascinating to academics, it remained that way to people like Andrew S. Tanenbaum who developed an academic teaching version of Unix for students, known as Minix. Linus Torvalds was a student interested in, but unsatisfied with, Minix and wished to develop a Unix-like operating system for his i386 PC with its nifty new 32-bit address space. (This is why Linux will run on a 386 and up, but not a 286 and down - assuming that's an issue for you.) In 1991 he announced the existence of his preliminary kernel in a Usenet post and offered the source code to the hacker world. Quickly, legions of developers improved and expanded the kernel under his guidance. With his open source Unix-like kernel, the GNU operating system could finally run free, thus came the term Linux.

Legally, it's a whole other kettle of fish and introduces legalisms like UNIX vs. Unix vs. Unix-like and so on. Unix the name, vs. Unix the system, etc. And there are also naming issues over Linux and GNU. But for the user's purposes, it suffices to know that they are running a Free Software, distributable, non-proprietary Unix-like system that isn't a closed source, restrictively distributed, proprietary Unix. Over the course of development, Linux has progressed to the point where there is little if anything that can be done with a Unix system that can't be done with it.


Q: How does Linux differ technically from Microsoft Windows?

A: There are many ways. If we ignore the way it's built (see the questions about the nature of "free" above), and focus purely on the technical differences, we can make a quick list of the most noticeable areas. Note that this list is somewhat subjective, you may not agree with them.

A much broader and up to date list can be read at David Wheeler's Why Open Source Software / Free Software (OSS/FS)? Look At the Numbers.

  • Linux is based on the design of UNIX which has now persisted and evolved over more than three decades, whereas Windows is currently derived from a mixture of 16- and 32-bit DOS code and VMS-influenced code. (David N. Cutler was a major architect of VMS prior to becoming chief architect of NT.)
  • Linux has pluggable user interfaces. You can make your computers' user interface work almost however you want it to, if you like. There are two mainstream desktops - KDE and Gnome with a host of less mainstream ones for people who aren't suited by the big two.
  • Linux and Microsoft Windows have different internal designs which means that they are in theory not compatible, i.e. applications, drivers and games written for Windows cannot be used on Linux and vice-versa. In practice the Linux community tends to bend these rules somewhat, see the question below on compatibility.
  • Linux has a different security system to Microsoft Windows, based (currently) on the concept of user vs root. The root user is the super user and can do anything, normally you should login as a normal "user" and you have limited access to your machine. When you need to do something that requires root access, only the program which requires enhanced privileges is given it, thus giving you some measure of protection against attacks.
  • It is often claimed that Linux is more secure than Windows. See below for a discussion of that.
  • Linux has a far more powerful command line than Windows does. If you don't mind typing things sometimes, this can prove to be a massive boost to productivity, and the command line is one of the most loved features of Linux. It's ultra-featureful even compared to the other forms of UNIX on which it was originally modeled. The flip side is that sometimes there are operations that can only be performed by typing in commands, as nobody has written a GUI (graphical user interface) for them yet. The number of things you need to use the command line for is being reduced all the time though.
  • X, the Linux graphics subsystem, is network transparent and an international standard protocol. That means you can run a program on one computer and view it on another. You probably don't need this feature but it's used a lot in certain types of institutions, and it can be handy for tech support.

Q: Is Linux compatible with Windows?

A: Yes, to some extent. Linux is capable of doing things previously regarded as impossible, including running some Windows applications, drivers and games without needing a copy of Windows - see Wine. It is also possible to run a full Windows operating system under Linux - see Win4Lin. Linux can also connect to Windows shared network drives using the Samba subsystem, read Windows disk partitions, and the OpenOffice and AbiWord/Gnumeric productivity programs can open many Microsoft Office files. You can use all major chat networks such as MSN and email services like Hotmail comfortably from Linux, though with reduced functionality in some cases.

There is also a reverse compatibility: many Open Source programs such as OpenOffice, Mozilla, Apache run on native Windows operating systems. A Windows user that switched to these programs could get away from the dependency on Microsoft file formats, which is often the most painful part of switching to Linux.

You might have noticed the words "some" and "many" in that paragraph. Unfortunately Microsoft closely guards any information about the inner workings of its software and file formats. This is one way they sustain their market dominance. Most of the interoperability with Windows has had to be gained through extensive reverse engineering and as such is often not perfect. Not all Windows apps and games can be run, not all hardware that works in Windows is supported in Linux. When Linux can interoperate with Microsoft controlled services, it is sometimes only possible with reduced functionality - for instance, no MSN Messenger clients for Linux currently support the Messenger games collection.

Improving Windows compatibility is an ongoing effort involving many thousands of people.


Q: What does Linux look like?

Everybodies Linux system looks a bit different as it's so easy to customise and theme. If you want a basic taste though, you could do worse than look here:


Q: Is Linux really more secure than Windows?

A: Possibly, depending on your point of view. The first thing to realize is there isn't anything inherently insecure about the Windows NT/2000/XP line (as opposed to 9x), and that the security of any system depends mostly upon the vigilance and skill of the person administering it.

In this discussion Windows will be taken to mean Windows NT/2000/XP. Windows 9x has no security at all and will therefore not be discussed.

Having said that, it's worth comparing the security systems of both. Both Windows and Linux share the concept of an administrator user, on Windows called (surprise) "Administrator" and on Linux called "root" for historical reasons. These users are all-powerful and can make the system do anything it's capable of. Typically, even on machines owned and used by one person, there are at least two accounts, the standard "user" account on which you run most of your apps, and the administrator account which is only used for, well, administration tasks.

Unfortunately on Windows, due to its Windows 3.1/95/98/ME heritage, many applications assume there is no security system in place (for instance their installers assume they can write to C:\Windows). This means that most users run as Administrator all the time, which is a bad idea as it means any program run can do anything to your system. On Linux, the opposite is true - because this system has always been there, there is no confusion over what apps (applications) can and cannot do.

The theory is that if a program is hacked, the hacker is restricted by the privilege level the program was running at, restricting the damage that can be done.

So things are secure, right? No, unfortunately not.

This seems rosy, but real life gets in the way. Firstly, exactly what can and cannot be done by root vs user is decided mostly on the basis of server machines (where this functionality is most useful). For instance, you need to be root to:

  • Beep the system beeper
  • Change the system clock
  • Install or uninstall some software
  • Modify the theme your login screen uses

None of these operations are really dangerous on single user machines. Worse, many programs that require root functionality for whatever reason have a special "set user id" flag set on them, they are called "suid root" binaries. These programs always run as root, regardless of who runs them. There are typically a few dozen of these programs on any Linux system. These programs can cause problems if they have flaws that allow them to do things they aren't intended to do. While not a big risk, it is a risk.

You don't need root to:

  • Send mail
  • Steal or simply delete personal documents from your home directory
  • Scribble on your screen

which are some of the most common things viruses do. D'oh.

Clearly, this security system isn't perfect. And remember this system is purely defensive, it does nothing to stop your machine being hacked or invaded in the first place. To combat these problems, two new technologies are being rolled out in the Linux community:

  • SELinux is a complete overhaul of the security system. Instead of a black and white user vs root distinction, each program is assigned only the capabilities it needs. This is a much finer grained (also making it more complex) level of security than was available before, and could go a long way towards helping stamp out many kinds of security problems. It was originally developed by the US National Security Agency.
  • ExecShield is a technology that makes a particularly common kind of hacker entrypoint much harder to exploit. The "buffer overflow" has been responsible for some of the worst computer breakins and worm outbreaks (Code Red, Blaster) in recent times. ExecShield can go a long way towards preventing them.

Open source operating systems

Q: Why Open Source?

A: Open Source offers two primary benefits and the importance of them differs from person to person (or corporation for that matter).

  1. There is a moral perspective to open source software which is purported by the GNU and FSF foundation. They claim that one has a moral right to the human readable form of a computer program. See the GNU Manifesto [1] for more details.
  2. The ability to read the source code for a binary program aids other developers no end. Why re-invent the wheel? Open sourced programs allow a developer to look at the code, see if s/he can improve it and possibly use it in a program of their own. There are also many things that can occur for a project if it is open source. Contributors from all over the world often help out and offer translations, documentation, bug reports and help in other forms.

Open Source is implemented in many ways. Most common under Linux is the GPL which many programs (including the kernel itself) are licensed under. However, there are other licenses which allow different levels of open-ness and reuse of the code.

Open source programs are often given away by the author(s) for no cost though this isn't an intrinsic quality. The project binaries can be sold as long as the source code is also available with it.

Switching to Linux from Windows

Q: Which Windows users should switch to Linux? Why? When? How?

These questions are discussed in Switching to Linux from Windows. To summarize:

  • Most should switch; exceptions: those not upgrading
  • To avoid Microsoft, improve performance, stability, and security, to lower costs
  • Start now, but don't hurry to finish
  • Switch gradually; minimize programming changes after the switch; plan to use Windows emulators for applications with no Linux equivalent.

Personal tools