Mandrake Linux 9.2

Reference Guide

http://www.MandrakeSoft.com

by Camille Bégnis, Christian Roy, Fabian Mandelbaum, Joël Pomerleau, Vincent Danen, Roberto Rosselli del Turco, Stefan Siegel, Marco De Vitis, Alice Lafox, Fred Lepied, Nicolas Planel, Kevin Lecouvey, Christian Georges, John Rye, Robert Kulagowski, Pascal Rigaux, Frédéric Crozat, Laurent Montel, Damien Chaumette, Till Kamppeter, Guillaume Cottenceau, Jonathan Gotti, Christian Belisle, Sylvestre Taburet, Thierry Vignaud, Juan Quintela, Pascal Lo Re, Kadjo N'Doua, Mark Walker, Roberto Patriarca, Patricia Pichardo Bégnis, Alexis Gilliot, Arnaud Desmons, Wolfgang Bornath, Alessandro Baretta, Aurélien Lemaire, Daouda Lo, Florent Villard, François Pons, Gwenole Beauchesne, Giuseppe Ghibò, Georg Halfas, Florin Grad, Joël Wardenski, Debora Rejnharc Mandelbaum, Stew Benedict, David Baudens.

Legal Notice

This manual is protected under MandrakeSoft intellectual property rights. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the invariant sections being the section called “About Mandrake Linux”, with the front-cover texts being listed below, and with no back-cover texts. A copy of the license is available on the GNU site.

Front-cover texts:

MandrakeSoft September 2003
http://www.mandrakesoft.com/
Copyright © 1999, 2000, 2001, 2002, 2003 by MandrakeSoft S.A. 
and MandrakeSoft Inc.

Mandrake”, “Mandrake Linux” and “MandrakeSoft” are registered trademarks of MandrakeSoft S.A.; Linux is a registered trademark of Linus Torvalds; UNIX is a registered trademark of The Open Group in the United States and other countries. All other trademarks and copyrights are the property of their respective owners.

Tools Used in The Making of This Manual

This manual was written in XML DocBook. The set of files involved were managed using Borges. The XML source files were processed by xsltproc, openjade and jadetex using a customized version of Norman Walsh's stylesheets. Screen shots were taken using xwd or GIMP and converted with convert. All these software are available on your Mandrake Linux distribution, and they are all free software.

September 2003


Table of Contents

Preface
About Mandrake Linux
Contact Mandrake Community
Join the Club
Purchasing Mandrake Products
Contribute to Mandrake Linux
Introduction
Note from the Editor
Conventions Used in this Book
Typing Conventions
General Conventions
I. The Linux System
1. Basic UNIX System Concepts
Users and Groups
File Basics
Processes
A Short Introduction to the Command Line
cd: Change Directory
Some Environment Variables and the echo Command
cat: Print the Contents of One or More Files to the Screen
less: a Pager
ls: Listing Files
Useful Keyboard Shortcuts
2. Disks and Partitions
Structure of a Hard Disk
Sectors
Partitions
Defining the Structure of Your Disk
Conventions for Naming Disks and Partitions
3. Introduction to the Command Line
File-Handling Utilities
mkdir, touch: Creating Empty Directories and Files
rm: Deleting Files or Directories
mv: Moving or Renaming Files
cp: Copying Files and Directories
Handling File Attributes
chown, chgrp: Change the Owner and Group of One or More Files
chmod: Changing Permissions on Files and Directories
Shell Globbing Patterns
Redirections and Pipes
A Little More About Processes
Redirections
Pipes
Command-Line Completion
Example
Other Completion Methods
Starting and Handling Background Processes: Job Control
A Final Word
4. Text Editing: Emacs and VI
Emacs
Short presentation
Getting started
Handling buffers
Copy, cut, paste, search
Quit Emacs
Vi: the ancestor
Insert mode, command mode, ex mode...
Handling buffers
Editing text and move commands
Cut, copy, paste
Quit Vi
A last word...
5. Command-Line Utilities
File Operations and Filtering
cat, tail, head, tee: File Printing Commands
grep: Locate Strings in Files
wc: Calculation Elements in Files
sort: Sorting File Content
find: Find Files According to Certain Criteria
Commands Startup Scheduling
crontab: reporting or editing your crontab file
at: schedule a command, but only once
Archiving and Data Compression
tar: Tape ARchiver
bzip2 and gzip: Data Compression Programs
Many, many more...
6. Process Control
More About Processes
The Process Tree
Signals
Information on Processes: ps and pstree
ps
pstree
Sending Signals to Processes: kill, killall and top
kill, killall
Mixing ps and kill: top
Setting Priority to Processes: nice, renice
renice
nice
II. Linux in Depth
7. File Tree Organization
Shareable/Unshareable, Static/Variable Data
The root Directory: /
/usr: The Big One
/var: Modifiable Data During Use
/etc: Configuration Files
8. File Systems and Mount Points
Principles
Partitioning a Hard Disk, Formatting a Partition
The mount and umount Commands
The /etc/fstab File
A Note About The Supermount Feature
9. The Linux File System
Comparison of a Few Filesystems
Different Usable Filesystems
Differences Between the Filesystems
And Performance Wise?
Everything is a File
The Different File Types
Inodes
Links
Anonymous Pipes and Named Pipes
Special Files: Character Mode and Block Mode Files
Symbolic Links, Limitation of Hard Links
File Attributes
10. The /proc Filesystem
Information About Processes
Information on The Hardware
The /proc/sys Sub-Directory
11. The Start-Up Files: init sysv
In the Beginning Was init
Runlevels
III. Advanced Uses
12. Building and Installing Free Software
Introduction
Requirements
Compilation
Structure of a distribution
Decompression
A tar.gz archive
The use of GNU Tar
Bzip2
Just do it!
Configuration
Autoconf
Imake
Various shell scripts
Alternatives
Compilation
Make
Rules
Go, go, go!
Explanations
What if... it does not work?
Installation
With Make
Problems
Support
Documentation
Technical support
How to find free software
Acknowledgments
13. Compiling And Installing New Kernels
Where to Find Kernel Sources
Unpacking Sources, Patching The Kernel (if Necessary)
Configuring The Kernel
Saving, Reusing Your Kernel Configuration Files
Compiling Kernel And Modules, Installing The Beast
Installing The New Kernel Manually
Updating LILO
Updating Grub
A. The GNU General Public License
Preamble
Terms and conditions for copying,  distribution  and  modification
B. GNU Free Documentation License
GNU Free Documentation License
0. PREAMBLE
1. APPLICABILITY AND DEFINITIONS
2. VERBATIM COPYING
3. COPYING IN QUANTITY
4. MODIFICATIONS
5. COMBINING DOCUMENTS
6. COLLECTIONS OF DOCUMENTS
7. AGGREGATION WITH INDEPENDENT WORKS
8. TRANSLATION
9. TERMINATION
10. FUTURE REVISIONS OF THIS LICENSE
How to use this License for your documents
C. Glossary
Index

List of Figures

1.1. Graphical Mode Login Session
1.2. Console Mode Login Session
1.3. 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. Emacs, editing two files at once
4.2. Emacs, before copying the text block
4.3. Emacs, after having copied the text block
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. Filesystem Characteristics