Reference Manual

Mandriva Linux 2006

http://www.mandriva.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, Aurelio Marinho Jargas, Felipe Arruda, Marcia Gawlak Hoshi, Bob Rye, Jean-Luc Borie, Roberto Patriarca.

Legal Notice

This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at opencontent.org).

  • Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder.

  • Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder.

Mandriva” and “DrakX” 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.

About the Making of this Manual

This manual is written and maintained by NeoDoc. Translations are ensured by NeoDoc, Mandriva and other translators.

This document 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 (for the electronic version) 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 all of them are available in your Mandriva Linux distribution.

September 2005


Table of Contents

Preface
1. About Mandriva Linux
1.1. Contacting the Mandriva Linux Community
1.2. Join the Club!
1.3. Subscribing to Mandriva Online
1.4. Purchasing Mandriva Products
1.5. Contributing to Mandriva Linux
2. About this Reference Guide
3. Note from the Editor
4. Conventions Used in this Book
4.1. Typing Conventions
4.2. General Conventions
1. Introduction to 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. 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
4. 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
5. The /proc File System
1. Information About Processes
2. Information on the Hardware
3. Display and change kernel parameters
2. Hands On
6. File Systems and Mount Points
1. Principles
2. Partitioning a Hard Disk, Formatting a Partition
3. The mount and umount Commands
7. 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
8. 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...
9. 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...
10. 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
11. The Start-Up Files: init sysv
1. In the Beginning Was init
2. Runlevels
2.1. Configuring Services on Run Levels
2.2. Controlling Services On a Running System
12. Secure Remote Access
1. SSH Server Setup
2. SSH Client Setup
3. Copying Files to or From The Remote System
13. Package Management From The Command Line
1. Installing and Removing Packages
2. Media Management
2.1. Adding New Media
2.2. Removing Media
2.3. Updating Media
2.4. Media Order
3. Tricks and Recipes
3.1. Synthesized vs. Complete Lists
3.2. Finding the Package which Contains a Specific File
3.3. Updating Packages
1. 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
6.1. Mount Points Illustrated
6.2. A Not Yet Mounted File System
6.3. File System Is Now Mounted
8.1. Editing Two Files at Once
8.2. Emacs, before copying the text block
8.3. Copying Text with emacs
8.4. Starting position in VIM
8.5. VIM, before copying the text block
8.6. VIM, after having copied the text block
10.1. Monitoring Processes with top
12.1. SSH Connection Schema

List of Tables

4.1. File System Characteristics