Reference Manual

Limited Edition 2005

http://www.mandrakesoft.com

NeoDoc

Camille Bégnis, Christian Roy, Fabian Mandelbaum, Roberto Rosselli del Turco, Marco De Vitis, Alice Lafox, John Rye, Wolfgang Bornath, Funda Wang, Patricia Pichardo Bégnis, Debora Rejnharc Mandelbaum, Mickael Scherer, Jean-Michel Dault, Lunas Moon, Céline Harrand, Fred Lepied, Pascal Rigaux, Thierry Vignaud, Giuseppe Ghibò, Stew Benedict, Francine Suzon, Indrek Madedog Triipus, Nicolas Berdugo, Thorsten Kamp, Fabrice Facorat, Xiao Ming, Snature , Guylhem Aznar, Pavel Maryanov, Annie Tétrault.

Legal Notice

This manual (except for the parts listed in the table below) is protected under Mandrakesoft intellectual property rights. By reproducing, duplicating or distributing this manual in whole or in part, you explicitly agree to conform to the terms and conditions of this license agreement.

This manual (except for the chapters listed in the table below) may be freely reproduced, duplicated and distributed either as such or as part of a bundled package in electronic and/or printed format, provided however that the following conditions are fulfilled:

  • That this copyright notice appears clearly and distinctively on all reproduced, duplicated and distributed copies.

  • That the “front cover texts” below, Section 1, “About Mandrakelinux”, and the section stating the names of authors and contributors are attached to the reproduced, duplicated or distributed version and remain unchanged.

  • That this manual, specifically for the printed format, is reproduced and/or distributed for noncommercial use only.

The express authorization of Mandrakesoft SA must be obtained prior to any other use of any manual or part thereof.

Mandrake”, “Mandrakesoft”, “DrakX” and “Linux-Mandrake” are registered trademarks in the US and/or other countries. The related “Star logo” is also registered. All rights reserved. All other copyrights embodied in this document remain the property of their respective owners.

Front-cover texts
Mandrakesoft April 2005
http://www.mandrakesoft.com/
Copyright © 1999-2005 by Mandrakesoft S.A. and Mandrakesoft Inc.
[Note]Note

The chapters listed in the table below are protected by a different license. Consult the table and links for more details about these licenses.

Tools Used in the Making of this Manual

This manual was written in DocBook XML. The set of files involved were managed using the Borges Collaborative Content Creation System (C3S). The XML source files were processed by xsltproc, and jadetex using a customized version of Norman Walsh's stylesheets. Screen shots were taken using xwd or GIMP and converted with convert (from the ImageMagick package). All these programs are free software and most of them are available in your Mandrakelinux distribution.

April 2005


Table of Contents

Preface
1. About Mandrakelinux
1.1. Contacting the Mandrakelinux Community
1.2. Join the Club
1.3. Subscribe to Mandrakeonline
1.4. Purchasing Mandrakesoft Products
1.5. Contribute to Mandrakelinux
2. About this Reference Guide
3. Note from the Editor
4. Conventions Used in this Book
4.1. Typing Conventions
4.2. General Conventions
I. The Linux System
1. Basic UNIX System Concepts
1. Users and Groups
2. File Basics
3. Processes
4. A Short Introduction to the Command Line
4.1. cd: Change Directory
4.2. Some Environment Variables and the echo Command
4.3. cat: Print the Contents of One or More Files to the Screen
4.4. less: a Pager
4.5. ls: Listing Files
4.6. Useful Keyboard Shortcuts
2. Disks and Partitions
1. Structure of a Hard Disk
1.1. Sectors
1.2. Partitions
1.3. Defining the Structure of Your Disk
2. Conventions for Naming Disks and Partitions
3. Introduction to the Command Line
1. File-Handling Utilities
1.1. mkdir, touch: Creating Empty Directories and Files
1.2. rm: Deleting Files or Directories
1.3. mv: Moving or Renaming Files
1.4. cp: Copying Files and Directories
2. Handling File Attributes
2.1. chown, chgrp: Change the Owner or Group of One or More Files
2.2. chmod: Changing Permissions on Files and Directories
3. Shell Globbing Patterns
4. Redirections and Pipes
4.1. A Little More About Processes
4.2. Redirections
4.3. Pipes
5. Command-Line Completion
5.1. Example
5.2. Other Completion Methods
6. Starting and Handling Background Processes: Job Control
7. A Final Word
4. Text Editing: Emacs and VI
1. Emacs
1.1. Short Presentation
1.2. Getting Started
1.3. Handling buffers
1.4. Copy, Cut, Paste, Search
1.5. Quit emacs
2. Vi: the ancestor
2.1. Insert Mode, Command Mode, ex Mode...
2.2. Handling Buffers
2.3. Editing Text and Move Commands
2.4. Cut, Copy, Paste
2.5. Quit Vi
3. A last word...
5. Command-Line Utilities
1. File Operations and Filtering
1.1. cat, tail, head, tee: File-Printing Commands
1.2. grep: Locating Strings in Files
1.3. Regular Expressions and Filtering egrep
1.4. wc: Counting Elements in Files
1.5. sort: Sorting File Content
2. find: Finding Files According to Certain Criteria
3. Scheduling of Commands Startup
3.1. crontab: Reporting or Editing your crontab File
3.2. at: Scheduling a command, but Only Once
4. Archiving and Data Compression
4.1. tar: Tape ARchiver
4.2. bzip2 and gzip: Data Compression Programs
5. Many, Many More...
6. Process Control
1. More About Processes
1.1. The Process Tree
1.2. Signals
2. Information on Processes: ps and pstree
2.1. ps
2.2. pstree
3. Sending Signals to Processes: kill, killall and top
3.1. kill, killall
3.2. Mixing ps and kill: top
4. Setting Priority to Processes: nice, renice
4.1. renice
4.2. nice
II. Linux in Depth
7. File-Tree Organization
1. Shareable/unshareable, Static/Variable Data
2. The root Directory: /
3. /usr: The Big One
4. /var: Data Modifiable During Use
5. /etc: Configuration Files
8. File Systems and Mount Points
1. Principles
2. Partitioning a Hard Disk, Formatting a Partition
3. The mount and umount Commands
9. The Linux File System
1. Comparing a Few File Systems
1.1. Different Usable File Systems
1.2. Differences Between File Systems
1.3. And Performance Wise?
2. Everything is a File
2.1. The Different File Types
2.2. Inodes
3. Links
4. “Anonymous” Pipes and Named Pipes
5. Special Files: Character Mode and Block Mode Files
6. Symbolic Links, Limitation of “Hard” Links
7. File Attributes
10. The /proc File System
1. Information About Processes
2. Information on the Hardware
3. The /proc/sys Sub-Directory
11. The Start-Up Files: init sysv
1. In the Beginning Was init
2. Runlevels
III. Advanced Uses
12. Building and Installing Free Software
1. Introduction
1.1. Requirements
1.2. Compilation
1.3. Structure of a distribution
2. Decompression
2.1. A tar.gz archive
2.2. The use of GNU Tar
2.3. Bzip2
2.4. Just do it!
3. Configuration
3.1. Autoconf
3.2. Imake
3.3. Various shell scripts
3.4. Alternatives
4. Compilation
4.1. Make
4.2. Rules
4.3. Go, go, go!
4.4. Explanations
4.5. What if... it does not work?
5. Installation
5.1. With Make
5.2. Problems
6. Support
6.1. Documentation
6.2. Technical support
6.3. How to find free software
7. Acknowledgments
13. Compiling and Installing New Kernels
1. Upgrading a Kernel Using Binary Packages
2. From The Kernel Sources
3. Unpacking Sources, Patching the Kernel (if Necessary)
4. Configuring The Kernel
5. Saving, Reusing your Kernel Configuration Files
6. Compiling Kernel and Modules, Installing the Beast
7. Installing the New Kernel Manually
7.1. Updating LILO
7.2. Updating Grub
A. Glossary
Index

List of Figures

1.1. Graphical Mode Login Session
1.2. The Terminal Icon on the KDE Panel
2.1. First Example of Partition Naming under GNU/Linux
2.2. Second Example of Partition Naming under GNU/Linux
4.1. Editing Two Files at Once
4.2. Emacs, before copying the text block
4.3. Copying Text with emacs
4.4. Starting position in VIM
4.5. VIM, before copying the text block
4.6. VIM, after having copied the text block
6.1. Monitoring Processes with top
8.1. A Not Yet Mounted File System
8.2. File System Is Now Mounted

List of Tables

9.1. File System Characteristics