Introduction to Linux

What is Linux ?

Linux is the kernel of an operating system (OS). The name joins the first name of the Kernel originator Linus Torvaalds with Unix, to make Linux a shortening of Linus' Unix.(Pronunciation guide: Linux is pronounced with a short, not a long I, combining syllables: "lin" as in lintel, not as in lining, followed by "ucks" as in trucks or tuxedo ) A kernel is the part of the operating system which is run first on bootup, (except for a much smaller boot-loader program which loads the kernel). The kernel also runs all the time in background to govern and mediate access by application programs to shared resources, and external devices and interfaces.

Linux provided the kernel, which was the missing part of the already existing GNU OS (recursive acronym for GNU's Not Unix), which is a free Unix clone operating system originated by Richard Stallman. Technically an operating system containing a Linux kernel is a GNU/Linux system, or even a XFree86/GNU/Linux operating system, to include some of the main components in the name, including the XFree86 implementation of the X-Windows window-display protocol and the GNU clone of the Unix operating system.

Other free software operating system kernels include FreeBSD, NetBSD, and Hurd. In practice very similar OSs are built around these various kernels, due to the common use of XFree86 and GNU OS components.

Most of the computer source code in the Linux kernel is contributed by many other programmers.

The trademark: Linux is related to unix, in the same sense that a Pentel is a biro. The word biro, in lowercase, is used to describe any ball-point pen, the trademark: Biro describes only pens made by a particular company.

Origins and development

Linux was started as a student project in 1991. Linus' motivation was to learn more about his Intel 386 based IBM PC clone hardware. He was unable to do this using the OS this came supplied with (MS-DOS) due to the limitations of MS-DOS. Minix, a very small Unix-like OS created by Andrew Tannenbaum was more useful for learning purposes because full source code for Minix was available allowing for study, but the license for Minix did not allow this to be freely modifiable or extensible. This reduced opportunities for significant experimentation, development or open discussion of source-based coding possibilities.

Linus' solution was to write his own kernel, publish this on the Internet and to include useful additional components and bug-fixes submitted by other contributors and users as patches.

Linux grew very rapidly, attracting contributions from thousands of programmers, some making individual and voluntary contributions, but with many more being encouraged or paid to do this by their employers. Linux is now believed to have tens of millions of users, has become the basis for sales of billions of dollars worth of a great variety of computer hardware, and is actively and openly developed and supported by many global companies including IBM, HP, Sun and Intel. Linux is increasingly finding favour as an Internet platform and in educational, commercial and public-authority markets.

Licensing and culture

In the early 1980ies Richard Stallman formed the GNU project, with the intention of creating a completely free operating system together with free application software to run on it. His motivation partly arose through a culture of software sharing which occurred at the MIT lab where he studied and researched. This culture was eroded as researchers left to work in private industry, and research collaborators involved in the development of Unix formed private companies which started exerting proprietary rights over their source code. In one incident Richard Stallman was denied access to the source code of a buggy printer driver in use in his lab, which he was consequently unable to fix. This denial of access resulted in the printer and software driver for it becoming unusable.

Stallman formed the GNU project and started writing and publishing free software including the GNU 'C' compiler, the EMACS editor and the Bash shell to name but a few of the project's outputs. These were licensed under the terms of the GNU Public License, co-authored by Stallman and the law professor, Lawrence Lessig. The GNU Licence was not the first free software license, but it was the first to introduce the concept of "copyleft" entitling the users of software to have access to source code, including any changes made to published versions. Effectively this gave the originators of copylefted software access to any improvements which others made and distributed.

In connection with GNU licensed software (and other free software licenses accepted as such by GNU) the term: "free" is used as in freedom of speech, not as in free beer or a free lunch. The latter use of the word free refers to not having to pay for something, while free software implies the right to study, change and share something. This requires access to the source code and the ability to change and redistribute this. The other meaning of the word "free" (as in beer) applied to software follows from the first meaning of free (as in democracy) but is less significant, as there are many free as in beer programs available to which source code is not provided and which therefore do not classify as free software within the GNU definition.

The consequences of this freedom and the willingness of many programmers and employers to apply and use this is that free software is available for education, peer review and inspection. When applied in collaborative and open development projects this allows users and other interested parties to contribute towards improvements and for wider inspection and peer review of the engineering product and process.

For practical purposes the term "open source" when applied to software means the same thing. Those who wish to promote the practical and commercial advantages of this kind of software sometimes choose to avoid the political or ethical implications of the use of the use of the word "free" (as in freedom).

Whatever the arguments for and against this concept of free software it is clear that the explosive growth of the free software movement and use of free software products has arisen from the existence of the Internet and is based on a similar development methodology as the Internet itself. Anyone can participate in Internet standards (IETF or Internet Engineering Task Force) working groups, and the resulting standards (the RFC or Request For Comment documents) are free software in their own right. In order to get a standards track proposal accepted as a RFC series document, the authors have to be able to demonstrate at least 2 independant and interworking software implementations of their proposal. In practice this has proved difficult to achieve without sharing the software source code. Many other important standards, e.g. HTML, XML, XSLT are free software, in the sense that the wider term: software includes its documentation, and the documents defining these standards are freely redistributable in modified form on condition that this is done in a manner which does not misrepresent the standards concerned, the authorship or authors' viewpoints.

Linux Distributions

A kernel without other operating system components and applications is not usable, let alone useful. Many free-software projects are concerned with the development of particular programs. Other projects are concerned with packaging the kernel together with other software components such as shells, utilities, compilers, languages, libraries, windowing systems, documentation and application software such as web browsers, file managers, word processors, email client and server software, databases and games etc.

Together with installation software and instructions, these software collections are called distributions. Examples of popular Linux distributions include:

Many more specialist distributions are also developed and maintained, targetted towards particular languages, e.g. Chinese or for specialist applications, e.g. using Linux as a network router and firewall, or for groups of users with particular requirements, e.g. blind people.

Installing Linux

One of the best ways of learning Linux is to install it on a suitable computer. Installing an operating system is more difficult than installing a single application on an existing operating system. Most people trying Linux for the first time already have an operating system and applications on their computer and data which they can't manage to do without.

Installing 2 operating systems on one computer is more difficult than installing a single OS, but you can have as many OSs as you have disk space for. The idea is to partition the disk space between OSs and install a boot manager program which gives you the option of which OS to start at boot time. As alternatives an OS can be booted and run from CD or DVD without needing to be installed on disk, or one OS can sometimes be run as a virtual machine application from another, but these options are restrictive, and what you will learn would have to include how to get around the limitations of such a configuration so that you can do anything useful with the more restricted operating environment.

While specialist Linux distributions exist for most other modern computing hardware, the following advice assumes you have a standard and fairly up-to date PC. If you are planning to run Linux on other hardware (e.g. a Macintosh or Sun Spacstation) this information will need to be adapted.

Assuming you have decided to install Linux as a second OS and a boot manager program, this will need some planning and thought before you start. You will need to choose a distribution. Unless you are running very old hardware, it is generally better to spend a small amount ordering or downloading (broadband only!) copies of the latest CDs for your selected distribution. If you can afford to add a second disk drive to your hardware, a relatively straightforward approach is to run one OS on each disk. This involves the minimum likely disturbance to your existing OS. Alternatives are to shrink the partition used for the existing OS, or to install both OSs from scratch on a fully reformatted and partitioned system. Whichever approach you adopt you should always first take a full backup of any data you intend to keep, and installation copies of applications which you don't have other copies of, before attempting this sort of work, in case anything goes wrong.

If you are buying a new PC and want space for other OSs ask the suppliers if they can support this, either by partitioning a single disk or by supplying the PC with an extra disk. If they can't support this, then unless you are willing to risk voiding their warranty, you are likely to be better off buying your PC from a more accommodating supplier. While Linux runs on nearly all computer systems and most peripherals, if you are buying new hardware it is well worth your while checking how compatible this is with Linux (or in the case of monitors and graphics cards, with XFree86), and avoiding anything for which good quality Linux drivers are not available. Certain cheap modems and printers are probably best avoided for this reason.

If you reinstall or modify the installation of a recent version of Microsoft Windows as part of this process, you may need to re-register your copy. It is a good idea to modify or reinstall the Windows installation first and then install Linux second, as Linux is more cooperative with other OSs than Windows.

The easiest way to install Linux is to boot Linux from the installation CD. You may need to change the boot order setting in your BIOS first before you can do this. Remember to change it back to boot from disk when you are finished. When you are ready to boot Linux from CD, a modern distribution will include an installation program and instructions to guide you through the rest of the process.

Why should I learn it ?

While some specialised aspects of kernel programming are likely to be fully understood by only a few, far more are able to use the Linux kernel for practical computing applications in science, networking, graphics and engineering etc.

One of the problems with trying to do everything on a closed system is that your learning will only go as deep as the access level you are given. A car with the bonnet welded down and without workshop manuals explaining the design and functioning of the engine would be a poor environment for attempting to learn practical car mechanics.

As you develop your knowledge of software engineering and computing science, increasingly the source code becomes the documentation. Learning depends upon being able to study and modify the environment in which you are working and being able to observe the results of your modifications.

While engineering education may be the most important reason for learning Linux, there are more practical reasons. Free software systems are used to support a majority of Internet domains ( see http://www.netcraft.com/survey/ ). Many engineers believe Linux to be more efficient, stable, reliable and secure than Windows, particularly as a server platform. Some Linux users (e.g. Spain's Extramadura regional education authority and Munich city council) are migrating to Linux and free software because citizens in a democracy are felt to have a right to know how their data is processed. Others (e.g. the Chinese government, the Stock Exchange, the film industry and the Namibian Schools network) are able to obtain better technical performance and reduced software licensing costs.

Further reading

The Internet Engineering Task Force: http://www.ietf.org/

The GNU Project: http://www.gnu.org/

Linux weekly news: http://lwn.net/

The Open Source initiative: http://www.opensource.org/