Debian Reference Osamu Aoki <[email protected]> Editor: David Sewell <[email protected]> ‘Authors’ on page 255 CVS, Mon Jan 3 16:08:23 UTC 2005 Abstract This Debian Reference (http://qref.sourceforge.net/) is intended to provide a broad overview of the Debian system as a post-installation user’s guide. It covers many aspects of system administration through shell-command examples. Basic tutorials, tips, and other information are provided for topics including fundamental concepts of the Debian system, system installation hints, Debian package management, the Linux kernel under Debian, system tuning, building a gateway, text editors, CVS, programming, and GnuPG for non-developers. Copyright Notice Copyright © 2001–2005 by Osamu Aoki <[email protected]>. Copyright (Chapter 2) © 1996–2001 by Software in the Public Interest. This document may be used under the terms of the GNU General Public License version 2 or higher. (http://www.gnu.org/copyleft/gpl.html) Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this document into another lan- guage, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. i Contents 1 Preface 1 1.1 Official document ..................................... 1 1.2 Document conventions .................................. 2 1.3 Example scripts ...................................... 2 1.4 Basic setup ......................................... 2 1.5 Basics of the Debian distributions ............................ 3 2 Debian fundamentals 5 2.1 The Debian archives ................................... 5 2.1.1 Directory structures ............................... 5 2.1.2 Debian distributions ............................... 6 2.1.3 The stable distribution ............................ 6 2.1.4 The testing distribution ............................ 7 2.1.5 The unstable distribution ........................... 7 2.1.6 The frozen distribution ............................ 7 2.1.7 Debian distribution codenames ......................... 8 2.1.8 Codenames used in the past ........................... 8 2.1.9 The source for codenames ............................ 8 2.1.10 The pool directory ................................ 9 2.1.11 Historical notes about Sid ............................ 9 2.1.12 Uploaded packages in incoming/ ...................... 10 2.1.13 Retrieving an older package ........................... 10 2.1.14 Architecture sections ............................... 10 2.1.15 The source code .................................. 10 CONTENTS ii 2.2 The Debian package management system ....................... 11 2.2.1 Overview of Debian packages ......................... 11 2.2.2 Debian package format ............................. 12 2.2.3 Naming conventions for Debian package filenames ............. 12 2.2.4 Preservation of local configuration ....................... 13 2.2.5 Debian maintenance scripts ........................... 13 2.2.6 Package priorities ................................. 14 2.2.7 Virtual packages ................................. 15 2.2.8 Package dependencies .............................. 15 2.2.9 The meaning of “Pre-Depends” ......................... 16 2.2.10 Package status ................................... 16 2.2.11 Holding back packages from an upgrade ................... 16 2.2.12 Source packages ................................. 17 2.2.13 Building binary packages from a source package ............... 17 2.2.14 Creating new Debian packages ......................... 18 2.3 Upgrading a Debian system ............................... 18 2.3.1 dpkg ........................................ 18 2.3.2 APT ......................................... 19 2.3.3 dselect ...................................... 19 2.3.4 Upgrading a running system .......................... 19 2.3.5 Downloaded and cached .deb archive files .................. 19 2.3.6 Record-keeping for upgrades .......................... 20 2.4 The Debian boot process ................................. 20 2.4.1 The init program ................................ 20 2.4.2 Runlevels ..................................... 20 2.4.3 Customizing runlevels .............................. 21 2.5 Supporting diversity ................................... 21 2.6 Internationalization .................................... 22 2.7 Debian and the kernel .................................. 22 2.7.1 Compiling a kernel from non-Debian source ................. 22 2.7.2 Tools to build custom kernels .......................... 23 CONTENTS iii 2.7.3 Alternative boot loaders ............................. 23 2.7.4 Custom boot floppies .............................. 23 2.7.5 Special provisions for dealing with modules ................. 24 2.7.6 De-installing an old kernel package ...................... 24 3 Debian System installation hints 25 3.1 General Linux system installation hints ........................ 25 3.1.1 Hardware compatibility basics ......................... 25 3.1.2 Determining a PC’s hardware and chip set .................. 26 3.1.3 Determining a PC’s hardware via Debian ................... 26 3.1.4 Determining a PC’s hardware via other OSs ................. 27 3.1.5 A Lilo myth .................................... 27 3.1.6 GRUB ....................................... 28 3.1.7 Choice of boot floppies .............................. 28 3.1.8 Installation ..................................... 29 3.1.9 Hosts and IP to use for LAN .......................... 29 3.1.10 User accounts ................................... 30 3.1.11 Creating filesystems ............................... 30 3.1.12 DRAM memory guidelines ........................... 33 3.1.13 Swap space .................................... 33 3.2 Bash configuration .................................... 34 3.3 Mouse configuration ................................... 34 3.3.1 PS/2 mice ..................................... 34 3.3.2 USB mice ..................................... 36 3.3.3 Touchpad ..................................... 37 3.4 NFS configuration ..................................... 38 3.5 Samba configuration ................................... 38 3.6 Printer configuration ................................... 39 3.6.1 lpr/lpd ...................................... 39 3.6.2 CUPS™ ...................................... 39 3.7 Other host installation hints ............................... 40 CONTENTS iv 3.7.1 Install a few more packages after initial install ................ 40 3.7.2 Modules ...................................... 41 3.7.3 CD-RW basic setup ................................ 41 3.7.4 Large memory and auto power-off ....................... 41 3.7.5 Strange access problems with some websites ................. 42 3.7.6 Dialup PPP configuration ............................ 43 3.7.7 Other configuration files to tweak in /etc/ ................. 43 4 Debian tutorials 45 4.1 Getting started ....................................... 45 4.1.1 Login to a shell prompt as root ......................... 45 4.1.2 Set up minimal newbie environment ...................... 46 4.1.3 Add a user account ................................ 47 4.1.4 Switch between virtual console ......................... 47 4.1.5 How to shut down ................................ 47 4.1.6 Play time ...................................... 48 4.2 Midnight Commander (MC) ............................... 48 4.2.1 Enhance MC .................................... 49 4.2.2 Start MC ...................................... 49 4.2.3 File manager in MC ............................... 49 4.2.4 Command-line tricks in MC ........................... 49 4.2.5 Editor in MC ................................... 50 4.2.6 Viewer in MC ................................... 50 4.2.7 Auto-start features of MC ............................ 51 4.2.8 FTP virtual filesystem of MC .......................... 51 4.3 Unix-like work environment ............................... 51 4.3.1 Special key strokes ................................ 51 4.3.2 Basic Unix commands .............................. 52 4.3.3 The command execution ............................. 56 4.3.4 Simple command ................................. 56 4.3.5 Command execution and environment variable ............... 56 CONTENTS v 4.3.6 Command search path .............................. 57 4.3.7 Command line options .............................. 57 4.3.8 Shell wildcards .................................. 57 4.3.9 Return value of the command .......................... 58 4.3.10 Typical command sequences .......................... 58 4.3.11 Command alias .................................. 60 4.4 Unix-like text processing ................................. 60 4.4.1 Regular expressions ............................... 61 4.4.2 Replacement expressions ............................ 62 4.5 Unix-like filesystem .................................... 63 4.5.1 Unix file basics .................................. 63 4.5.2 The filesystem concept in Debian ........................ 64 4.5.3 File and directory access permissions ..................... 65 4.5.4 Timestamps ...................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages277 Page
-
File Size-