Reference Manual

Mandrakelinux 10.0

http://www.mandrakesoft.com

by Camille Bégnis, Christian Roy, Fabian Mandelbaum, Roberto Rosselli del Turco, Marco De Vitis, Alice Lafox, John Rye, Patricia Pichardo Bégnis, Wolfgang Bornath, Joël Wardenski, Debora Rejnharc Mandelbaum, Daniel Gueysset, Mickael Scherer, Jean-Michel Dault, Funda Wang, Lunas Moon, Céline Harrand, Fred Lepied, Pascal Rigaux, Thierry Vignaud, Giuseppe Ghibò, Stew Benedict.

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, the section called “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 authorisation 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 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 May 2004
http://www.mandrakesoft.com/
Copyright © 1999-2004 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.

 Original CopyrightLicense
Chapter 12, Building and Installing Free SoftwareBenjamin Drieu, APRILGNU General Public License GPL

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 programs are free and are available in your Mandrakelinux distribution.

March 2004


Table of Contents

Preface
About Mandrakelinux
Contacting the Mandrakelinux Community
Join the Club
Purchasing Mandrakesoft Products
Contribute to Mandrakelinux
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: Count 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/: Data Modifiable During Use
/etc/: Configuration Files
8. File Systems and Mount Points
Principles
Partitioning a Hard Disk, Formatting a Partition
The mount and umount Commands
9. The Linux File System
Comparison of a Few File Systems
Different Usable File Systems
Differences Between the File Systems
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
Upgrading a Kernel Using Binary Packages
From The 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. 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