Introducing Linux - Getting Started with Linux - Linux All-in-One For Dummies, 5th Edition (2014)

Linux All-in-One For Dummies, 5th Edition (2014)

Book I. Getting Started with Linux

 width=

webextras.eps Visit www.dummies.com for great Dummies content online.

Contents at a Glance

Chapter 1: Introducing Linux

Chapter 2: Installing Linux

Chapter 3: Troubleshooting and Configuring Linux

Chapter 4: Trying Out Linux

Chapter 1. Introducing Linux

In This Chapter

arrow Explaining what Linux is

arrow Going over what Linux distributions typically include

arrow Discovering what Linux helps you manage

arrow Getting started with Linux

By virtue of your holding this book in your hands, it’s a safe bet that you’ve heard something about Linux. If you’re wondering just exactly what Linux is, whether it’s worth serious consideration, and what it can help you do, this chapter is for you. Here I provide a broad picture of Linux and tell you how you can start using it right away.

technicalstuff.eps Although Linux can run on many hardware platforms, this book focuses on Linux for Intel 80x86 and Pentium processors (basically any PC that can run any flavor of Windows).

What Is Linux?

A PC can be thought of as a combination of hardware — things you can touch, such as the system box, monitor, keyboard, and mouse. The system box contains the most important hardware of all — the central processing unit (CPU), the microchip that runs the software (any program that tells the computer how to do your bidding), which you can’t actually touch. In a typical Pentium-based PC, the Pentium microprocessor is the CPU. Other important hardware in the system box includes the memory (RAM chips) and the hard drive.

The operating system is the program that has to interact with all the hardware and get it to play nice. The operating system software manages all that hardware and runs other software at your command. You, the user, provide those commands by choosing menus, clicking icons, or typing cryptic text. Linux is an operating system — as are Unix, Mac OS, Windows 7 or 8, Windows Vista, and even older Windows versions. The Linux operating system is modeled after Unix; in its most basic, no-frills form, the Linux operating system also goes by Linux kernel.

The operating system is what gives a computer — any computer — its personality. For example, you can run Windows on a PC — and on that same PC, you can also install and run Linux. Then, depending on which operating system is installed and running at any particular time, the same PC can operate as a Windows system or as a Linux system.

The primary job of an operating system is to load software (computer programs) from the hard drive (or other permanent storage) into the memory and get the CPU to run those programs. Everything you do with your computer is possible because of the operating system, so if the operating system somehow messes up, the entire system freezes. You may know how infuriating it can be when your favorite operating system — maybe even the one that came with your PC — suddenly calls it quits just as you were about to click the Send button after composing that long e-mail to your friend. You try a number of things frantically, but nothing happens. Then it’s time for the Reset button (or pulling the cord from the back of the machine if your computer’s builders weren’t wise enough to include a Reset). Luckily, that sort of thing almost never happens with Linux — it has a reputation for being a very reliable operating system.

technicalstuff.eps In technical mumbo jumbo, Linux is a multiuser, multitasking operating system. Those terms just mean that Linux enables multiple users to log in, and each of those users can run more than one program at the same time. Nearly all operating systems are multiuser and multitasking these days, but when Linux first started in 1993, multiuser and multitasking were big selling points.


technicalstuff.eps Does Linux really run on any computer?

Linux runs on many types of computer systems — and there are so many distributions that it does seem able to run on nearly any type of computer.

Linus Torvalds and other programmers developed Linux for the Intel 80x86 (and compatible) line of processors. This book covers Linux for Intel 80x86 and Pentium processors. (These are known as the IA32 architecture processors, or i386, because they support the instruction set of the 80386 processor.)

Nowadays Linux is also available for systems based on other processors — such as

· AMD’s 64-bit AMD64 processors

· The Motorola 68000 family

· Alpha AXPs

· Sun SPARCs and UltraSPARCs

· Hewlett-Packard’s HP PA-RISC

· The PowerPC and PowerPC64 processors

· The MIPS R4x00 and R5x00

IBM has released its own version of Linux for its S/390 and zSeries mainframes. And a number of popular Linux distributions, including Ubuntu and Fedora, can even be run on Sony’s Playstation 3 video game system.


Linux distributions

A Linux distribution consists of the Linux kernel (the operating system) and a collection of applications, together with an easy-to-use installation program.

tip.eps Most people just say Linux to refer to a specific Linux distribution.

You will find many Linux distributions, and each includes the standard Linux operating system and the following major packages:

· The X Window System: It’s the graphical user interface.

· One or more graphical desktops: Among the most popular are GNOME and KDE.

· A selection of applications: Linux programs come in the form of ready-to-run software, but the source code (the commands we humans use to tell the computer what to do) is included (or available), as is its documentation.

Current Linux distributions include a huge selection of software — so much that some distributions usually require one or more DVD-ROMs.

tip.eps The development and maintenance of the Linux kernel, the software packages in a Linux distribution, and the Linux distributions themselves are organized as open source projects. In a nutshell, open source means access to the source code and the right to freely redistribute the software without any restrictions. There’s a lot more to the definition than this succinct note. To find out the details of what open source means and the acceptable open source licenses, you can visit the Open Source Initiative website at www.opensource.org.

Table 1-1 lists a few major Linux distributions along with a brief description of each. Note, however, that there are many more Linux distributions than the ones shown in Table 1-1. To find out more about Linux distributions, visit DistroWatch.com at http://distrowatch.com. At that website, you can read up on specific distributions as well as find links for downloading or ordering DVDs for specific distributions.

Table 1-1 Major Linux Distributions

Distribution

Description

Debian GNU/Linux

This noncommercial distribution started in 1993 and continues to be a popular distribution, with many volunteer developers around the world contributing to the project. Debian is a huge distribution that takes some time to install. After you have installed the base Debian system, you can install and upgrade Debian packages easily with a package installer called apt-get(where apt stands for the Advanced Packaging Tool.) Debian is available free of charge from www.debian.org. Debian is the basis for several other recent distributions including Knoppix, MEPIS, Ubuntu, and Xandros.

Fedora

This distribution, once known as Fedora Core, is the successor to Red Hat Linux, which is the Linux distribution from Red Hat. Fedora Core 1, released in November 2003, was the successor to Red Hat Linux 9. The alpha release of Fedora 13 was in 2010. Fedora is freely available and uses the Red Hat Package Manager (RPM) format for its software packages. You can download Fedora Core from http://fedoraproject.org. The latest Fedora download can be found at http://fedoraproject.org/en/get-fedora.

Gentoo Linux

This is a noncommercial, source-based (all software is provided in source-code form) distribution that first appeared in 2002. The installer provides some binary packages to get the Linux going, but the idea is to compile all source packages on the user’s computer. The requirement to install so much makes it time-consuming to build a full-fledged Gentoo system with the latest graphical desktops, multimedia, and development tools because all the packages have to be downloaded and compiled. Gentoo Linux is freely available from www.gentoo.org.

Knoppix

This Live distribution is based on Debian and named after its developer, Klaus Knopper of Germany. Knoppix can be used as a recovery tool (to fix problems with an already installed Linux system) because you can run Knoppix directly from a CD without having to first install it on the hard drive. (Although other distributions have this capability, Knoppix is ideally suited for the task.) The Knoppix CD stores software in compressed format, and Knoppix decompresses the programs on-the-fly. With this approach, Knoppix can pack up to 2GB of software on a CD. Knoppix uses the Debian package management. For information on downloading Knoppix free of charge, visit the Knoppix website at www.knopper.net/knoppix/index-en.html.

Linspire

This commercial distribution was first released in 2002 under the name LindowsOS. Linspire uses the Debian package format and offers software downloads for a fee through what it calls the Click-N-Run web-based interface. Though you can still find it and download it from some locations, Linspire was acquired by Xandros in 2008 and has since been discontinued as a Linux distribution.

Mandriva Linux One

This popular distribution began life as a 1998 release of Red Hat Linux with an easy-to-use installer and with KDE as the default desktop. Until recently, this distribution was called Mandrakelinux. Mandriva Linux One uses the Red Hat Package Manager (RPM) format for its software packages. You can download the latest version at www.mandriva.com. Click the Download link for more information.

MEPIS Linux

This Debian-based Live distribution was first released in July 2003. It includes a graphical installer that can be launched from the Live distribution to install MEPIS on the hard drive. MEPIS has good hardware detection and comes with Java and multimedia software, which makes it popular. MEPIS uses the Debian package format. You can download from www.mepis.org.

Slackware Linux

This distribution is one of the oldest, having been first released in 1992. Slackware uses compressed tar files for its packages and provides a text-based installer with limited automatic detection of hardware. You do all software configurations by editing text files. Slackware is freely available from www.slackware.com.

SUSE Linux

This commercial distribution switched to a community development project called openSUSE in August 2005. SUSE Linux Open Source Software (OSS) is now freely available, and the retail SUSE Linux is based on the open source version. SUSE comes with the YaST installation and configuration tool, which is one of the best administration tools available. SUSE Linux uses RPM packages. The openSUSE project provides the ISO image files from various mirror sites. Visit www.opensuse.org for more information.

Ubuntu Linux

This Debian-based, noncommercial Linux distribution has become very popular since its initial release in 2004. Ubuntu is available as both an install distribution and a Live distribution. Because it’s Debian based, you can install the basic desktop system from the install media and then use the apt-get tool to install other packages as well as keep the system up to date. You can download Ubuntu free of charge from www.ubuntulinux.com/download.

Xandros Desktop OS

This distribution is the successor to Corel Linux and is based on Debian. Xandros is aimed at first-time Linux users, with an installer that can repartition the hard drive. The versatile Xandros File Manager is a key selling point of this distribution. However, Xandros includes some proprietary components that prevent redistribution. A trial version of both Xandros Desktop and Server can be downloaded for evaluation. In 2008, Xandros acquired Linspire, developer of the Linspire and Freespire Linux desktop operating systems. Visit www.xandros.com.ar for more information about Xandros.

As you can see from the brief descriptions in Table 1-1, some Linux distributions, such as Knoppix and MEPIS, are in the form of Live CDs or DVDs. A Live version includes a Linux kernel that you can boot and run directly from the CD or DVD without having to first install it on your hard drive. Such Live distributions can be handy if you want to try out a distribution before you decide whether to install it.

Many Linux distributions are commercial products that you can buy online or in computer stores and bookstores. If you have heard about open source and the GNU (which stands for GNU’s Not Unix) license, you may think that no one can sell Linux for profit. Luckily for companies that sell Linux distributions, the GNU license — also called the GNU General Public License (GPL) — does allow commercial, for-profit distribution (but requires that the software be distributed in source-code form) and stipulates that anyone may copy and distribute the software in source-code form to anyone else. Several Linux distributions are available free of charge under the GPL, which means that you can download as many copies of the OS as you like.

Making sense of version numbers

lxo-101.eps The Linux kernel — and each Linux distribution — has its own version number. Additional software programs (such as GNOME and KDE) that come with the Linux distribution have their own version numbers as well. The version numbers for the Linux kernel and the Linux distributions are unrelated, but each has particular significance.

Linux kernel version numbers

After Linux kernel version 1.0 was released on March 14, 1994, the loosely knit Linux development community adopted a version-numbering scheme. Version numbers such as 1.x.y and 2.x.y, where x is an even number, are considered the stable versions. The last number, y, is the patch level, which is incremented as problems are fixed. For example, 2.6.14 is a typical, stable version of the Linux kernel. Notice that these version numbers are in the form of three integers separated by periods — major.minor.patch — where major and minor are numbers denoting the major and minor version numbers, and patch is another number representing the patch level.

Version numbers of the form 2.x.y with an odd x number are beta releases for developers only; they may be unstable, so you shouldn’t adopt such versions for day-to-day use. For example, if you were to find version 2.7.5 of the Linux kernel, the 7 in the minor version number tells you it’s a beta release. Developers add new features to these odd-numbered versions of Linux.

You can find out about the latest version of the Linux kernel online at www.kernel.org.

Distribution-specific version numbers

Each Linux distribution has a version number as well. These version numbers usually follow the format x.y, where x is the major version, and y is the minor version.

Unlike with the Linux kernel’s version numbers, no special meaning is associated with odd- and even-numbered minor versions. Each version of a Linux distribution includes specific versions of the Linux kernel and other major components, such as GNOME, KDE, and various applications.

The developers of active Linux distributions usually release new versions of their distribution on a regular basis — about every six to nine months. For example, Ubuntu 13.43 was released in April 2013; 13.10 was released in October 2013. Typically, each new major version of a Linux distribution provides significant new features.

 width= Debian always has at least three releases at any time — stable, unstable, and testing.

· Stable: Most users prefer this type of release because it’s the latest officially released distribution.

· Unstable: The developers are working on this release.

· Testing: The release contains packages that have gone through some testing but aren’t ready for inclusion in the stable release yet.

Linux Standard Base (LSB)

Linux has become important enough that there’s a standard for Linux called the Linux Standard Base (or LSB, for short). LSB is a set of binary standards that should help reduce variations among the Linux distributions and promote portability of applications. The idea behind LSB is to provide an application binary interface (ABI) so that software applications can run on any Linux (or other Unix) systems that conform to the LSB standard. The LSB specification references POSIX (Portable Operating System Interface) standards as well as many other standards, such as the C and C++ programming language standards, the X Window System version 11 release 6 (X11R6), and the Filesystem Hierarchy Standard (FHS). LSB version 1.2 (commonly referred to as LSB 1.2) was released on June 28, 2002. LSB 2.0 was released on August 30, 2004, and LSB 4.0, on November 11, 2008.

The LSB specification is organized into two parts — a common specification that remains the same across all types of processors and a set of hardware-specific specifications, one for each type of processor architecture. For example, LSB 1.2 has architecture-specific specifications for Intel 32-bit (IA32) and PowerPC 32-bit (PPC32) processors. LSB 1.3 adds a specification for the Intel 64-bit (IA64) architecture and IBM zSeries 31-bit (S/390) and 64-bit (S390X) processors, in addition to the ones for IA32 and PPC32. LSB 2.0 added specification for the AMD 64-bit (AMD64 or X86_64) processors. The current LSB specification — LSB 4.0 — supports seven processor architectures: IA32, IA64, PPC32, PPC64 (64-bit PowerPC), S390, S390X, and X86_64.

An LSB certification program exists. Several Linux distributions are certified to be LSB-compliant, IA32 runtime environments. To discover more about LSB, visit http://www.linuxfoundation.org/collaborate/workgroups/lsb. The latest list of LSB-certified systems is available at www.linuxfoundation.org.

Contents of a Linux Distribution

A Linux distribution comes with the Linux kernel and a lot more software. These software packages include everything from graphical desktops to Internet servers to programming tools for creating new software. In this section, I briefly describe some major software packages that are bundled with typical Linux distributions. Without this bundled software, Linux wouldn’t be as popular as it is today.


What is the GNU Project?

GNU is a recursive acronym that stands for GNU’s Not Unix. The GNU Project was launched in 1984 by Richard Stallman to develop a complete Unix-like operating system. The GNU Project developed nearly everything needed for a complete operating system except for the operating system kernel.

All GNU software was distributed under the GNU General Public License (GPL). GPL essentially requires that the software is distributed in source-code form and stipulates that any user may copy, modify, and distribute the software to anyone else in source-code form. Users may, however, have to pay for their individual copies of GNU software.

The Free Software Foundation (FSF) is a tax-exempt charity that raises funds for work on the GNU Project. To find out more about the GNU Project, visit its home page at www.gnu.org. The home page is also where you can find information about how to contact the Free Software Foundation and how to help the GNU Project.


GNU software

At the heart of a Linux distribution is a collection of software that came from the GNU Project. You get to know these GNU utilities only if you use your Linux system through a text terminal — a basic command-line interface that doesn’t use onscreen visuals; instead, it shows you a prompt at which you type your commands. (Or you could use a graphical window that mimics a text terminal and still have use of GNU utilities.) The GNU software is one of the basic parts of any Linux distribution.

As a Linux user, you may not realize the extent to which all Linux distributions rely on GNU software. Nearly all the tasks you perform in a Linux system involve one or more GNU software packages. For example, the GNOME graphical user interface (GUI) and the command interpreter (that is, the bash shell) are both GNU software programs. By the way, the shell is the command-interpreter application that accepts the commands you type and then runs programs in response to those commands. If you rebuild the kernel or develop software, you do so with the GNU C and C++ compiler (which is part of the GNU software that accompanies Linux). If you edit text files with the ed or emacs editor, again you’re using a GNU software package. The list goes on and on.

technicalstuff.eps Table 1-2 lists some well-known GNU software packages that come with most Linux distributions. Depending on your interests, you may never need to use many of these packages, but knowing what they are in case you ever do need them is a good idea.

Table 1-2 Well-Known GNU Software Packages

Software Package

Description

autoconf

Generates shell scripts that automatically configure source-code packages.

automake

Generates Makefile.in files for use with autoconf.

bash

The default shell (command interpreter) in Linux.

bc

An interactive calculator with arbitrary-precision numbers.

Binutils

A package that includes several utilities for working with binary files: ar, as, gasp, gprof, ld, nm, objcopy, objdump, ranlib, readelf, size, strings, and strip.

Coreutils

A package that combines three individual packages called Fileutils, Shellutils, and Textutils and implements utilities such as chgrp, chmod, chown, cp, dd, df, dir, dircolors, du, install, ln, ls, mkdir, mkfifo, mknod, mv, rm, rmdir, sync, touch, vdir, basename, chroot, date, dirname, echo, env, expr, factor, false, groups,hostname, id, logname, nice, nohup, pathchk, printenv, printf, pwd, seq, sleep, stty, su, tee, test, true, tty, uname, uptime, users, who, whoami, yes, cut, join, nl, split, tail, and wc.

cpio

Copies file archives to and from disk or to another part of the file system.

diff

Compares files, showing line-by-line changes in several different formats.

ed

A line-oriented text editor.

emacs

An extensible, customizable, full-screen text editor and computing environment.

Findutils

A package that includes the find, locate, and xargs utilities.

finger

A utility program designed to enable users on the Internet to get information about one another.

gawk

The GNU Project’s implementation of the awk programming language.

gcc

Compilers for C, C++, Objective-C, and other languages.

gdb

Source-level debugger for C, C++, and Fortran.

gdbm

A replacement for the traditional dbm and ndbm database libraries.

gettext

A set of utilities that enables software maintainers to internationalize (make the software work with different languages such as English, French, and Spanish) a software package’s user messages.

ghostscript

An interpreter for the PostScript and Portable Document Format (PDF) languages.

ghostview

An X Window System application that makes ghostscript accessible from the GUI, enabling users to view PostScript or PDF files in a window.

The GIMP

The GNU Image Manipulation Program, an Adobe Photoshop-like image-processing program.

GNOME

Provides a graphical user interface (GUI) for a wide variety of tasks that a Linux user may perform.

GNUchess

A chess game.

GNU C Library

For use with all Linux programs.

Gnumeric

A graphical spreadsheet (similar to Microsoft Excel) that works in GNOME.

grep package

Includes the grep, egrep, and fgrep commands, which are used to find lines that match a specified text pattern.

groff

A document formatting system similar to troff.

gtk+

A GUI toolkit for the X Window System (used to develop GNOME applications).

gzip

A GNU utility for compressing and decompressing files.

indent

Formats C source code by indenting it in one of several different styles.

less

A page-by-page display program similar to more but with additional capabilities.

libpng

A library for image files in the Portable Network Graphics (PNG) format.

m4

An implementation of the traditional Unix macro processor.

make

A utility that determines which files of a large software package need to be recompiled, and issues the commands to recompile them.

ncurses

A package for displaying and updating text on text-only terminals.

patch

A GNU version of Larry Wall’s program to take the output of diff and apply those differences to an original file to generate the modified version.

rcs

Revision Control System; used for version control and management of source files in software projects.

sed

A stream-oriented version of the ed text editor.

Sharutils

A package that includes shar (used to make shell archives out of many files) and unshar (to unpack these shell archives).

tar

A tape-archiving program that includes multivolume support — the capability to archive sparse files (files with big chunks of data that are all zeros), handle compression and decompression, and create remote archives — and other special features for incremental and full backups.

texinfo

A set of utilities that generates printed manuals, plain ASCII text, and online hypertext documentation (called info), and enables users to view and read online info documents.

time

A utility that reports the user, system, and actual time that a process uses.

GUIs and applications

lxo-101.eps Face it — typing cryptic Linux commands on a terminal is boring. For average users, using the system through a graphical user interface (GUI, pronounced “GOO-ee”) — one that gives you icons to click and windows to open — is much easier. This is where the X Window System, or X, comes to the rescue.

X is kind of like Microsoft Windows, but the underlying details of how X works are different from Windows. X provides the basic features of displaying windows onscreen, but (unlike Microsoft Windows) it doesn’t come with any specific look or feel for graphical applications. That look and feel comes from GUIs, such as GNOME and KDE, which make use of the X Window System.

Most Linux distributions come with the X Window System in the form of XFree86 or X.Org X11 — implementations of the X Window System for 80x86 systems. XFree86 and X.Org X11 work with a wide variety of video cards available for today’s PCs.

technicalstuff.eps Until early 2004, XFree86 from the XFree86 Project (www.xfree86.org) was the most commonly used X Window System implementation for x86 systems. However, around version 4.4, some changes to the XFree86 licensing terms caused concerns to many Linux and Unix vendors — they felt that the licensing terms were no longer compatible with the GNU General Public License (GPL). In January 2004, several vendors formed the X.Org Foundation (www.x.org) to promote continued development of an open source X Window System and graphical desktop. The first release of X.Org X11 uses the same code that was used by XFree86 4.4, up until the time when the XFree86 license changes precipitated the creation of X.Org Foundation.

As for the GUI, Linux distributions include one or both of two powerful GUI desktops: KDE (K Desktop Environment) and GNOME (GNU Object Model Environment). If both GNOME and KDE are installed on a PC, you can choose which desktop you want as the default — or switch between the two. KDE and GNOME provide desktops similar to those of Microsoft Windows and the Mac OS. GNOME also comes with the Nautilus graphical shell, which makes finding files, running applications, and configuring your Linux system easy. With GNOME or KDE, you can begin using your Linux workstation without having to know cryptic Linux commands. However, if you ever need to use those commands directly, all you have to do is open a terminal window and type the commands at the prompt.

Linux also comes with many graphical applications. One of the most noteworthy programs is The GIMP (The GNU Image Manipulation Program), a program for working with photos and other images. The GIMP’s capabilities are on a par with those of Adobe Photoshop.

Although Linux used to lack in providing common productivity software — such as word processing, spreadsheet, and database applications — this situation has changed. Linux comes with the LibreOffice.org office productivity applications. In addition, you may want to check out the following prominent, commercially available office productivity applications for Linux:

· Applixware: This office package is a good example of productivity software for Linux. You can find it at www.vistasource.com.

· LibreOffice: Forked from OpenOffice, LibreOffice (www.libreoffice.org) is a well-known productivity software package. The original OpenOffice is available from Apache and can be found at www.openoffice.org.

· CrossOver Office: From CodeWeavers (www.codeweavers.com/products/crossover-linux/download), CrossOver Office can be used to install your Microsoft Office applications (Office, for example) as well as several other Windows applications in Linux.

As you can see, there’s no shortage of Linux office applications that are compatible with Microsoft Office.

Networks

Linux comes with everything you need to use the system in networks to exchange data with other systems. On networks, computers that exchange data must follow well-defined rules, or protocols. A network protocol is a method that the sender and receiver agree upon for exchanging data across a network. Such a protocol is similar to the rules you might follow when you’re having a polite conversation with someone at a party. You typically start by saying hello, exchanging names, and then taking turns talking. That’s about the same way network protocols work. The two computers use the same protocol to send bits and bytes back and forth across the network.

One of the best-known (and most popular) network protocols is Transmission Control Protocol/Internet Protocol (TCP/IP). TCP/IP is the protocol of choice on the Internet — the “network of networks” that spans the globe. Linux supports the TCP/IP protocol and any network applications that make use of TCP/IP.

Internet servers

Some popular network applications are designed to deliver information from one system to another. When you send electronic mail (e-mail) or visit websites using a web browser, you use these network applications (also called Internet services). Here are some common Internet services:

· Electronic mail (e-mail) that you use to send messages to any other person on the Internet using addresses such as joe@someplace.com

· World Wide Web (or simply, the web) that you browse using a web browser

· News services, where you can read newsgroups and post news items to newsgroups

· File transfer utilities that you can use to upload and download files

· Remote login that you can use to connect to and work with another computer (the remote computer) on the Internet — assuming you have the required username and password to access that remote computer

Any Linux PC can offer these Internet services. To do so, the PC must be connected to the Internet, and it must run special server software called Internet servers. Each of the servers uses a specific protocol for transferring information. For example, here are some common Internet servers that you find in Linux:

· sendmail is the mail server for exchanging e-mail messages between systems using SMTP (Simple Mail Transfer Protocol).

· Apache httpd is the web server for sending documents from one system to another using HTTP (HyperText Transfer Protocol).

· vsftpd is the server for transferring files between computers on the Internet using FTP (File Transfer Protocol).

· innd is the news server for distribution of news articles in a store-and-forward fashion across the Internet using NNTP (Network News Transfer Protocol).

· in.telnetd allows a user on one system to log in to another system on the Internet, using the TELNET protocol.

· sshd allows a user on one system to log in securely to another system on the Internet, using the SSH (Secure Shell) protocol.

Software development

Linux is particularly well suited to software development. Straight out the box, it’s chock-full of software-development tools, such as the compiler and libraries of code needed to build programs. If you happen to know Unix and the C programming language, you’ll feel right at home programming in Linux.

As far as the development environment goes, Linux has the same basic tools (such as an editor, a compiler, and a debugger) that you might use on other Unix workstations, such as those from IBM, Sun Microsystems, and Hewlett-Packard (HP).

tip.eps If you work by day on one of these Unix workstations, you can use a Linux PC in the evening at home to duplicate that development environment at a fraction of the cost. Then you can either complete work projects at home or devote your time to software you write for fun and to share on the Internet.


technicalstuff.eps Stuff programmers want to know about Linux

These features make Linux a productive software-development environment:

· GNU C compiler (gcc): Compiles ANSI-standard C programs.

· GNU C++ compiler (g++): Supports ANSI-standard C++ features.

· GNU compiler for Java (gcj): Compiles programs written in the Java programming language.

· GNU make utility: Enables you to compile and link large programs.

· GNU debugger (gdb): Enables you to step through your program to find problems and to determine where and how a program failed. (The failed program’s memory image is saved in the core file; gdb can examine this file.)

· GNU profiling utility (gprof): Enables you to determine the degree to which a piece of software uses your computer’s processor time.

· Subversion, Concurrent Versions System (CVS), and Revision Control System (RCS): Maintains version information and controls access to the source files so that two programmers don’t inadvertently modify the same source file at the same time.

· GNU emacs editor: Prepares source files and even launches a compile-link process to build the program.

· Perl: Enables you to write scripts to accomplish a specific task, tying together many smaller programs with Linux commands.

· Tool Command Language and its graphical toolkit (Tcl/Tk): Enables you to build graphical applications rapidly.

· Python: Enables you to write code in an interpreted programming language comparable to Perl and Tcl. (For example, the Fedora Core installation program, called anaconda, is written in Python.)

· Dynamically linked, shared libraries: Allows your actual program files to be much smaller because all the library code that several programs may need is shared — with only one copy loaded in the system’s memory.


Online documentation

As you become more adept at using Linux, you may want to look up information quickly — without having to turn the pages of (ahem) this great book, for example. Luckily, Linux comes with enough online information to jog your memory in those situations when you vaguely recall a command’s name but can’t remember the exact syntax of what you’re supposed to type.

If you use Linux commands, you can view the manual page — commonly referred to as the man page — for a command by using the man command. (You do have to remember that command to access online help.)

You can also get help from the GUI desktops. Both GNOME and KDE desktops come with help viewers to view online help information. Most distributions include a help option in the desktop menu or a help icon on the desktop that you can use to get online help. You can then browse the help information by clicking the links on the initial help window. Figure 1-1 shows a typical help window — this one from Ubuntu’s desktop.

 width=

Figure 1-1: Online help is available from the GUI desktop.

Managing Your PC with Linux

lxo-102.eps As an operating system, Linux acts as the intermediary through which you — as the “lord of the system” — manage all the hardware. The hardware includes the system box, the monitor, the keyboard, the mouse, and anything else connected to the system box. The catchall termperipheral refers to any equipment attached to the system. If you use a laptop computer, all your hardware is packaged into the laptop.

Inside that system box is the system’s brain — the microprocessor (Intel Pentium 4, for example), also called the CPU — that performs the instructions contained in a computer program. When the microprocessor runs a computer program, that program’s instructions are stored in the memory, or RAM (random-access memory). This means that any part of the memory can be accessed randomly — in arbitrary order.

The system box has another crucial component — the hard drive (or hard disk, as it is sometimes called). The hard drive is the permanent storage space for computer programs and data. It’s permanent in the sense that the contents don’t disappear when you power off the PC. The hard drive is organized into files, which are in turn organized in a hierarchical fashion into directories and subdirectories (somewhat like organizing papers in folders in the drawers of a file cabinet).

To keep a Linux system running properly, you (or someone else) must make sure that the hardware is working properly and that the files are backed up regularly. There’s also the matter of security — making sure that only legitimate people can access and use the system. These tasks are called system administration.

If you use Linux at a big facility with many computers, a full-time system administrator probably takes care of all system-administration tasks. On the other hand, if you run Linux on a home PC, you are the system administrator. Don’t let the thought frighten you. You don’t have to know any magic incantations or prepare cryptic configuration files to be a system administrator. Most Linux distributions include many graphical tools that make system administration a point-and-click job, just like running any other application.

Distribution media

Some Linux distributions come on a single DVD-ROM. After installation, the Linux kernel and all the applications are stored on your hard drive — which is where your PC looks first when you tell it to do something.

Typically, the hard drive is prepared to use Linux during the installation process. After that, you usually leave the hard drive alone except to back up the data stored there or (occasionally) to install and update applications.

Using CD-ROMs or DVD-ROMs in Linux is easy. While you’re logged in at the GNOME or KDE desktop, just pop a CD or DVD in to the drive, and the system should automatically detect the DVD/CD-ROM. Depending on the Linux distribution, either a DVD/CD-ROM icon appears on the desktop or a file manager automatically opens and displays the contents of the DVD/CD-ROM. If all else fails, you can type a simple mount command to associate the DVD/CD-ROM with a directory on your system. This process of accessing the files on a CD or a DVD from Linux is called mounting the CD or the DVD.

Besides the hard drive and DVD/CD-ROM drive, of course, your PC may have other drives, such as a USB flash drive. Using those disks in Linux is also simple: You insert a disk or drive and double-click the icon that represents that medium on the GUI desktop. Doing so mounts the disk or drive so that you can begin using it.

Peripheral devices

Anything connected to your PC is a peripheral device, as are some components (such as sound cards) that are installed inside the system box. You can configure and manage these peripheral devices in Linux.

One of the common peripherals is a printer, typically hooked up to the USB (Universal Serial Bus) or parallel port of your PC. (Many distributions come with a graphical printer configuration tool that you can use to configure the printer.)

Another peripheral device that needs configuration is the sound card. Most Linux distributions detect and configure sound cards, just as Windows does. However, if Linux can’t detect the sound card correctly, you may have to run a text mode or graphical tool to configure the sound card.

Linux configures other peripheral devices, such as the mouse and keyboard, at the time of installation. You can pretty much leave them alone after installation.

Nowadays PCs come with the USB interface; many devices, including printers and scanners, plug into a PC’s USB port.

tip.eps One nice feature of USB devices is that you can plug them into the USB port and unplug them at any time — the device doesn’t have to be connected when you power up the system. These devices are called hot plug because you can plug in a device when the system is hot,meaning while it’s running. Linux supports many hot plug USB devices. When you plug a device into the USB port, Linux loads the correct driver and makes the device available to applications.

File systems and sharing

The entire organization of directories and files is the file system. You can, of course, manage the file system using Linux. When you browse the files from the GNOME or KDE graphical desktop, you work with the familiar folder icons.

remember.eps A key task in caring for a file system is to back up important files. In Linux, you can use the tar program to archive one or more directories on a USB drive or on other media. You can even back up files on a tape (if you have a tape drive). If you have a CD or DVD burner, you can also burn a CD or DVD with the files you want to back up or save for posterity.

Linux can also share parts of the file system with other systems on a network. For example, you can use the Network File System (NFS) to share files across the network. To a user on the system, the remote system’s files appear to be in a directory on the local system.

Linux also comes with the Samba package, which supports file sharing with Microsoft Windows systems. Samba makes a Linux system work just like a Windows file or print server. You can also access shared folders on other Windows systems on your network.

Network

Now that most PCs are either linked in a local area network (LAN) or connected to the Internet, you need to manage your connection to the network as well. Linux comes with a network configuration tool to set up the LAN. For connecting to the Internet with a modem, there’s usually a GUI Internet dial-up tool.

If, like many users, you connect to the Internet with DSL or cable modem, you need a PC with an Ethernet card that connects to the cable or DSL modem. It also means that you have to set up a local area network and configure the Ethernet card. Fortunately, these steps are typically a part of Linux installation. If you want to do the configurations later, you can by using a GUI network configuration tool.

Linux also includes tools for configuring a firewall, which is a protective buffer that helps keep your system relatively secure from anyone trying to snoop over your Internet connection. You can configure the firewall by using iptables commands or by running a GUI firewall-configuration tool.

Getting Started

Based on personal experience in exploring new subjects, I prescribe a four-step process to get started with Linux (and with Linux All-in-One For Dummies):

1. Install Linux on your PC (as shown in Book I — this one).

2. Configure Linux so that everything works to your liking (as shown in Book I).

3. Explore the GUI desktops and the applications (as shown in Book II).

4. Find out the details of specific subjects, such as Internet servers (as shown in Book IV).

In the rest of this chapter, I explain this prescription a bit more.

Step 1: Install

Microsoft Windows usually comes installed on your new PC, but Linux usually doesn’t. So your first hurdle is to get Linux onto your PC. Although some vendors are now offering Linux pre-installed, this is still a rarity.

After you overcome that initial human fear of the unknown, I’ll bet you find Linux fairly easy to install — but where do you get it in the first place? Well, the good news is that it’s easily found online and Book I shows how to install Linux, step by step.

warning.eps A typical complete Linux distribution is huge — but if you have good bandwidth, Linux is free to download. For example, you can visit the Linux Online website at www.linux.org and click the Download button.

Step 2: Configure

When you finish installing Linux, the next step is to configure individual system components (for example, the sound card and the printer) and tweak any needed settings. Book I shows how to configure the nooks and crannies of Linux.

tip.eps If you aren’t getting a graphical login screen, the X Window System may not have been configured correctly during installation. You have to fix the X configuration file for the GUI to work.

You may want to configure your GUI desktop of choice — GNOME or KDE (or both). Each has configuration tools. You can use these tools to adjust the look and feel of the desktop (background, title fonts, or even the entire color scheme). Book II shows how to make your desktop even more your own.

After you’re through with configuration, all the hardware on your system and the applications should run to your liking.

Step 3: Explore

With a properly configured Linux PC at your disposal, you’re ready to explore Linux itself. You can begin the process from the GUI desktop — GNOME or KDE — that you see after logging in. Look at the GUI desktops and the folders and files that make up the Linux file system, as discussed in Book II. You can also try out the applications from the desktop. You find office and multimedia applications and Internet applications to explore.

Also try out the shell: Open a terminal window and type some Linux commands in that window. You can also explore the text editors that work in text mode, as covered in Book II. Knowing how to edit text files without the GUI, just in case the GUI isn’t available, is a good idea. At least you won’t be helpless.

Step 4: Find out more

After you explore the Linux landscape and know what is what, you can dig deeper and find out more about specific subject areas. For example, you may be interested in setting up Internet servers. You can then learn the details of setting up individual servers, such as sendmail for e-mail, Apache for a web server, and the INN server for news, as covered in Book IV.

You can find out about many more areas, such as security, scripting, and system administration, as discussed in Books V, VI, and VII.

Of course, you can expect this step to go on and on, even after you have your system running the way you want it — for now. After all, learning is a lifelong journey.

Bon voyage!