1.1 Linux Overview

As you study this section, answer the following questions:

AT&T http://en.wikipedia.org/wiki/Unix

Ken Thompson http://en.wikipedia.org/wiki/Ken_Thompson

Dennis Ritchie http://en.wikipedia.org/wiki/Dennis_Ritchie

Richard Stallman -- GNU/GPL http://en.wikipedia.org/wiki/Richard_Stallman

Andrew Tanenbaum http://en.wikipedia.org/wiki/Andrew_S._Tanenbaum

MINIX http://en.wikipedia.org/wiki/Minix

Linus Torvalds http://en.wikipedia.org/wiki/Linus_Torvalds

LINUX http://en.wikipedia.org/wiki/Linux

LICENSING FACTS

In most cases, when you obtain or "buy" software, you really do not own it. Rather, you are granted a license to use the software. The terms of the licensing agreement differ depending on the type of license accompanying the software. To understand software licensing, you should understand the following terms.

Licensing Type Description
Open Source Software that is distributed with the source files.
End users can modify and recompile the software to meet their needs.
Usually developed as a community project.
More specifically, Open Source is a certification mark for software that adheres to the Open Source Initiative standards.
Closed Source Software that is distributed without the source files.
Many commercially available software is closed source (such as Microsoft Windows, Word, Excel).
Freeware Software distributed without cost. The software may be open source or closed source.
Free Software Software that is freely distributable, includes the source code, and allows the end user to modify or enhance the software.
Free software may be distributed at a cost. The "free" refers to the freedom of use, not necessarily no cost.
Shareware Software that is distributed free of cost on a trial or limited use basis. After the initial use, if you continue to use the software, you are expected to pay a fee for its use.
Shareware is typically closed source software.
Artistic License Artistic license is a type of licensing agreement that allows users to modify and distribute open source software, while still retaining some degree of copyright protection for the work being distributed. The GNU General Public License is one example of an artistic license.

Linux is distributed as Open Source software (meeting OSI standards) under the GNU General Public License (GPL). The GNU/GPL provides that:

Go to http://www.linux.org/info/gnu.html to read the GNU licensing terms.

You should be aware that using Linux in your organization is not without cost. Although you do not pay for a license for Linux, expect to pay for the following items:

1.2 Linux Architecture

As you study this section, answer the following questions:

Distribution http://en.wikipedia.org/wiki/Linux_distribution

Kernel http://en.wikipedia.org/wiki/Linux_kernel

Shell http://en.wikipedia.org/wiki/Shell_%28computing%29

Daemon http://en.wikipedia.org/wiki/Daemon_%28computer_software%29

GUI http://en.wikipedia.org/wiki/GUI

Desktop Environment http://en.wikipedia.org/wiki/Desktop_environment

Window Manager http://en.wikipedia.org/wiki/X_window_manager

KDE http://en.wikipedia.org/wiki/KDE

Gnome http://en.wikipedia.org/wiki/GNOME

Apache http://en.wikipedia.org/wiki/Apache_Software_Foundation

Samba http://en.wikipedia.org/wiki/Samba_%28software%29

BIND http://en.wikipedia.org/wiki/BIND

Component Facts

The Linux operating system is a modular system, which means that the components can function without affecting one another. Because of its modular nature, you can create a highly customized Linux operating system based on your individual requirements. The table below lists the modules typical to Linux. Each component (or set of components) is generally developed independently, and each component offers functionality while minimally affecting the other components.

Component Description Examples
Kernel
  • The kernel is the core component of the operating system.
  • The kernel coordinates communication between the hardware and other software components.
  • The kernel is the only component that is technically Linux. All other components are add-ons that turn the system into a fully-functional operating system.
The kernel is constantly being updated.
Current and previous kernel versions can be found at www.kernel.org.
Shell
  • The shell is the user interface that accepts and interprets commands (either from a command prompt or a script) and forwards them to the kernel.
  • A Linux shell is comparable to the DOS interpreter/DOS prompt.
bash (Bourne-Again Shell) is the most common (and default) Linux shell. It is an enhancement of the original Bourne shell (sh).
tcsh is an enhanced version of the Berkeley UNIX C-shell (csh).
Graphical User Interface (GUI)
  • The GUI is responsible for drawing graphical elements on the computer screen.
  • The Linux GUI was designed to work the same way regardless of the video hardware on the computer system.
XWindows is the most common GUI system. X Windows works in conjunction with an X Client to render the GUI. X Windows is capable of running as a server and sending the GUI images to separate machines running an X Client. Xfree86 is the most common X Client
Window Manager/Desktop Environment
  • The window manager modifies the GUI output that comes from X Windows.
  • To change or modify the X Windows output, you can simply change the window manager.
  • You can also use a desktop environment with a window manager. A desktop environment provides software (e.g., Web browsers and file managers) and gives users access to common tasks.
KDE (Kommon Desktop Environment), which uses the K Window Manager (kwm) and comes with the Qt toolkit for C++.
GNOME (GNU Object Model Environment) does not specify a window manager because its design allows use of any window manager. However, it does use Metacity as a default window manager in the absence of a window manager. GNOME requires the use of the GIMP Toolkit (GTK) to render the full GNOME desktop.
Windows Emulator
  • A Windows emulator is an implementation of the Microsoft Windows API.
  • The emulator lets you run Windows applications on Linux without running the Windows operating system.
Wine, available at www.winehq.com.
Boot Loader
  • A boot loader runs after the system executes the BIOS ROM and POST functions.
  • It loads the Linux kernel from the boot partition on the hard disk.
  • It is also used to boot other operating systems present on the computer.
LILO (LInux LOader) is the most common bootloader.
GRUB (GRand Unified Bootloader) is a new bootloader that offers extra functionality.
Applications and Utilities
  • Utilities are special programs that help you manage the system.
  • Applications are programs that let you use the computer for specific tasks (such as word processing, listening to music, or managing data).
Text Editors (command-line based) Vi
Nano
File Managers Nautilus (used with GNOME)
Konqueror (used with KDE)
Office Applications (similar to Word, Excel, etc.) OpenOffice
KOffice (for KDE)
Graphic Editor (like PhotoShop) GIMP
Daemons (Services)
  • Daemons are programs that run in the background, providing additional functionality to a system.
  • The Windows equivalent of a daemon is a service.
File/Print Services SMB/Samba
NFS
Print services LPR
CUPS
Web Server Apache
Tomcat
Domain Name Service (DNS) BIND
E-mail Sendmail
Postfix
Firewall ipchains
Smoothwall
Astaro Security Linux
Proxy Server Squid

As you can see, there are dozens of components that can be used with the Linux core. The availability of multiple components to provide a specific feature gives you a lot of choice, more than you might have with other operating system choices such as Microsoft Windows.

File Types

API http://en.wikipedia.org/wiki/Application_programming_interface

There are two types of files: Directories and Normal Files Source

Most files are just files, called regular files; they contain normal data, for example text files, executable files or programs, input for or output from a program and so on.

While it is reasonably safe to suppose that everything you encounter on a Linux system is a file, there are some exceptions.


The File System

The Linux Standard Base
Filesystem Hirearchy Standard 

root
    /bin Essential command binaries
/boot Static files of the boot loader
/dev Device files
/etc Host-specific system configuration
/lib Essential shared libraries and kernel modules
/media Mount point for removeable media
/mnt Mount point for mounting a filesystem temporarily
/opt Add-on application software packages
/sbin Essential system binaries
/srv Data for services provided by this system
/tmp Temporary files
/usr Secondary hierarchy
/var Variable data
Source

File Types

In the Linux operating system, everything (including devices and users) is a file. As the system runs, Linux opens, reads, writes to (if necessary), and closes the files it needs. The table below lists the most common types of files you'll encounter when working with Linux. (One thing to remember about working with files in Linux is that all file names are case sensitive.)

File Type Description
Directory A file type designed specifically to hold or point to other file types.
Normal File Every file that is not a directory is generally a normal file.
Special Files Hard Link A hard link is a duplicate entry in the file system that points to a specific piece of data. Hard links are not often used. If the original entry in the file system is deleted, the hard link maintains a valid pointer to the data.
Symbolic Link A symbolic link is a file system entry that points to another file system entry, which in turn points to a valid piece of data. Symbolic links can work across volumes and file systems. Symbolic links are similar to shortcuts in Windows.
Character A file type that accepts input one character (i.e., byte) at a time. Character files often point to devices like sound cards, serial ports, or video port.
Block A file type that accept input in blocks (i.e., groups of bytes). Block files often point to storage devices.
Pipe A named pipe file allows you to send information between applications.
Socket A socket file is similar to a named pipe file, but a socket file allows information to be exchanged over a network.

Directory Contents

The unified file system uses a single root directory that contains various other directories. File systems from other hard drive partitions mount to directories beneath the root directory, providing access to a single directory structure. The file system hierarchy standard (FHS) governs the unified file system for Linux systems by defining a standard set of directories, subdirectories, and files. FHS is a subset of the Linux standards base (LSB) which is an organization and a set of guidelines for promoting a set of standards to increase Linux distribution compatibility.

Directory Description
/ The / character represents the root directory of the Linux system. All directories are below the / (root directory) of the system.
/bin The /bin directory contains binary commands that are available to all users.
/boot The /boot directory contains the kernel and boot loader files.
/dev The /dev directory contains device files.
/etc The /etc directory contains configuration files specific to the system.
/home The /home directory contains by default the user home directories.
/initrd The /initrd directory is used during the boot process to hold the initial RAM drive image.
/lib The /lib directory contains shared program libraries and kernel modules.
/media The /media directory contains the /cdrom and /floppy directories. It is the point where CD-ROM and floppy drives can be mounted according to the FHS (Filesystem Hierarchy Standard) v2.3.
/mnt The /mnt directory is an empty directory. This was the mount point for CD-ROM and floppy drives prior to FHS v2.3.
/opt The /opt directory contains the additional programs.
/proc The /proc directory contains information about the system state and processes.
/root The /root directory is the root user's home directory. Do not confuse /root with the root of the system (/).
/sbin The /sbin directory contains system binary commands.
/srv The /srv directory contains files for services like the FTP and Web servers.
/sys The /sys directory is new with release 2.6. It takes some of the system state date that was previously contained in /proc.
/tmp The /tmp directory contains temporary files created by programs during system use.
/usr The /usr directory contains system commands and utilities. /usr holds the following directories:
  • /usr/bin
  • /usr/lib
  • /usr/local
  • /usr/sbin
  • /usr/X11R6 (for the X Window system)
Depending on the implementation, the /usr directory might also include the /usr/doc subdirectory (or /usr/share/doc subdirectory) to hold documentation accessible to all users.
/var The /var directory contains data files that change constantly. Standard subdirectories include:
  • /var/mail (holds e-mail in boxes)
  • /var/spool (holds files waiting for processing, such as print jobs or scheduled jobs)
  • /var/www (holds www or proxy cache files)

1.3 Choosing Linux

As you study this section, answer the following questions:

This section covers the following exam objectives:


Choose Linux as a server or a workstation

Samba
Apache
DHCP

Computer Roles

Before you install Linux, you should know how you'll use the system. The way the system is used will determine what kinds of components you should select to install. The table below lists common deployments for Linux systems and the components those deployments should include.

Role Description Common Components
Desktop A desktop implementation is targeted to the end-user in environments such as home-based computers (for gaming, multi-media, or Web surfing) or home offices.
  • Graphical desktop
  • Web browser (like Mozilla)
  • E-mail client
  • Productivity tools (an office productivity suite like GNOME Office, for example)
  • Sound, graphics, and video support
  • Gaming support
Workstation A workstation implementation is for large corporate installation, system administrators, or developers. Office workstations often have more business productivity applications while workstations for software developers and system administrators have tools for creating and compiling software and administering network resources.
  • Word processor
  • Database editor
  • Desktop publishing applications
  • Spreadsheet applications
  • E-mail applications
  • Development tools
  • System administration tools
Server A server provides networking services to multiple users or to other computers. Because end users do not typically log on to a server directly, graphical and multimedia components are often not installed on servers to conserve system resources and eliminate sources of problems. Linux can provide many different services (e.g., file, email, and Web services) on one machine unless it is being accessed by a very large number of people.
  • Mail services
  • Routing
  • Proxy service
  • FTP service
  • Web services (to allow users to access information, like an online catalog for example, through a Web browser)
  • Network file system (NFS) (for file sharing)
  • Storage (e.g., an appliance server)
  • Database services (for storing client information, for example)

Distribution
RPM
Debian
Slackware
Gentoo

Distribution Facts

A Linux distribution is a collection of components packaged to work together as a complete system. A package is the collection of components (tools, software, utilities, devices, etc.) put together by an individual or group to make up a distribution. Each package (and therefore distribution) can use a package manager, which is a tool that installs and maintains a Linux package. For example, the RPM family of Linux distributions uses the Red Hat package manager (RPM).

The following table lists the most popular Linux distributions and their characteristics.

Distribution Characteristics Examples
RPM An RPM distribution uses the Red Hat package manager (RPM). RPM distributions are the most common commercially-available distributions. Red Hat (most common in the United States)
SUSE (most common in Europe)
Mandrake
Debian Debian distributions use the Debian package manager. The Debian family contains the largest number of packages (software and tools) because it is the most open of the Linux families. Xandros
Linspire (formerly Lindows)
.tar.gz/.tgz/Slackware This Linux family doesn't use a package manager; rather, its installation and management is done through tarball or gzip tarball files. CollegeLinux
VectorLinux
SLAX
BuffaloLinux
Source-based distributions The distributions in this family are designed to work from source code. The user compiles the kernel and software from source code prior to installing the software. Gentoo

If you are just starting out with Linux, you should probably choose a commercial distribution to take advantage of easy setup and possibly technical support (for a fee). As you learn Linux, you likely will not need copies of the source code for the kernel and other components. Common places to get a Linux distribution include:

After you have some experience with Linux, you might then want to experiment with source code versions of Linux. A good source for information is www.tldp.org which is the community supported 'The Linux Document Project', a site full of Linux resource information.

1.4 Installing Linux

As you study this section, answer the following questions:

After finishing this section, you should be able to complete the following tasks:

This section covers the following exam objectives:

DistroWatch.com

Installation Facts

Depending on your organization and how you will deploy Linux, you have several choices of how to access the Linux source files to complete the installation. Listed below are several different methods you can use. (Before performing any installation, check the hardware compatibility list (HCL) for the Linux version you've selected to make sure your system components are supported.)

Installation File Location Description
CD-ROM or removable media Installation source files are on a disk or other removable media such as:
  • USB, Firewire devices
  • Floppy, Zip disk (multiple disks might be required)
  • CD-ROM
Use this method if you have access to portable installation source files.
Network Installation files are located on a shared directory on the network. To complete the installation, you must:
  1. Copy the source files to a shared network location.
  2. Boot the computer to a limited version operating system with networking support (typically from a boot floppy). Make sure the computer uses the appropriate protocols to connect to the network share (FTP, SMB, NFS).
  3. Connect to the network share and start the installation.
Using this method, the computer does not need a drive for accessing the installation files, and you can start multiple installs with a single source.
Disk imaging Using disk imaging, you install Linux on one system. You then use imaging tools (or even backup/restore utilities) to replicate the installation to other computers.
Use this method to install Linux quickly on multiple systems. In most cases, the hardware in each system must be identical.

When you start the install program, you can often choose how to interact with the installation program. The following table compares various methods.

Installation Method Description
GUI install With the GUI method, you make installation choices using the mouse and keyboard from graphical installation screens.
The GUI install is the default install for most distributions.
Text install A text install bypasses the GUI screens, giving you basic text screens instead.
Use the text install if the system has video card problems or low video support.
Scripted In a scripted installation, you answer all installation questions ahead of time. Your responses are stored in a file that is then read by the install program. The installation progresses without interaction.
Use this system for a fully automated install and to quickly install on multiple systems.

Although the installation process differs depending on the distribution, the following list represents a fairly generic installation process you will follow:

  1. Identify network requirements, select a distribution, identify the computer role, and verify that all hardware meets system requirements
  2. Select an installation file location and installation method
  3. Start the installation
  4. Choose the installation language and the system keyboard and mouse
  5. Partition the hard disk
  6. Configure the boot loader
  7. Configure the network and firewall
  8. Choose a system language and time zone
  9. Create user accounts and configure authentication
  10. Select components and services to install
  11. Configure the video hardware
  12. Install components and create boot disks
  13. Select monitor and X Windows settings

During installation, the super user account, called the root user, is created. Following installation, you can log on to Linux by typing root as the username and then supplying the password you entered during installation.

Red Hat Linux provides you with the redhat-config-language command that runs with an active X server occurrence to change the default language on your system after installation.

Linux systems can determine the date and time in three ways: