Slackware Linux Basics for Slackware Linux 12.0
Total Page:16
File Type:pdf, Size:1020Kb
Slackware Linux Basics For Slackware Linux 12.0 Daniël de Kok Slackware Linux Basics: For Slackware Linux 12.0 by Daniël de Kok Published Sun May 18 14:41:12 CEST 2008 Copyright © 2002-2008 Daniël de Kok License Redistribution and use in textual and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of this book must retain the above copyright notice, this list of conditions and the following disclaimer. 2. The names of the authors may not be used to endorse or promote products derived from this book without specific prior written permission. THIS BOOK IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS BOOK, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Linux is a registered trademark of Linus Torvalds. Slackware Linux is a registered trademark of Patrick Volkerding and Slackware Linux, Inc. UNIX is a registered trademark of The Open Group. Table of Contents Preface ........................................................................................................................................... xiii I. Getting started ................................................................................................................................ 1 1. About this book ...................................................................................................................... 5 1.1. Availability ................................................................................................................. 5 1.2. Conventions ................................................................................................................ 5 2. An introduction to Slackware Linux ........................................................................................... 7 2.1. What is Linux? ............................................................................................................ 7 2.2. What is GNU/Linux? .................................................................................................... 7 2.3. What is Slackware Linux? ............................................................................................. 7 2.4. The UNIX philosophy ................................................................................................... 8 2.5. Free and open source software ........................................................................................ 8 2.6. Slackware Linux 12.0 features ........................................................................................ 8 2.7. Getting Slackware Linux ............................................................................................... 9 3. Sources of help ..................................................................................................................... 11 3.1. On your system .......................................................................................................... 11 3.2. On the Internet ........................................................................................................... 12 4. General concepts ................................................................................................................... 15 4.1. Multitasking ............................................................................................................... 15 4.2. Filesystem hierarchy .................................................................................................... 16 4.3. Devices ..................................................................................................................... 17 5. Installing Slackware Linux ...................................................................................................... 19 5.1. Booting the installation CD-ROM .................................................................................. 19 5.2. Partitioning a hard disk ................................................................................................ 20 5.3. Installing Slackware Linux ........................................................................................... 21 6. Custom installation ................................................................................................................ 43 6.1. Partitioning a hard disk ................................................................................................ 43 6.2. Initializing and mounting filesystems ............................................................................. 43 6.3. Installing packages ...................................................................................................... 45 6.4. Post-install configuration .............................................................................................. 45 6.5. Automated installation script ......................................................................................... 48 II. Slackware Linux Basics ................................................................................................................. 53 7. The shell ............................................................................................................................. 57 7.1. Introduction ............................................................................................................... 57 7.2. Executing commands ................................................................................................... 57 7.3. Moving around ........................................................................................................... 58 7.4. Command history ....................................................................................................... 63 7.5. Completion ................................................................................................................ 63 7.6. Wildcards .................................................................................................................. 64 7.7. Redirections and pipes ................................................................................................. 65 8. Files and directories .............................................................................................................. 67 8.1. Some theory .............................................................................................................. 67 8.2. Analyzing files ........................................................................................................... 70 8.3. Working with directories .............................................................................................. 75 8.4. Managing files and directories ...................................................................................... 76 8.5. Permissions ............................................................................................................... 78 8.6. Finding files .............................................................................................................. 86 8.7. Archives .................................................................................................................... 93 8.8. Mounting filesystems .................................................................................................. 95 8.9. Encrypting and signing files ......................................................................................... 97 9. Text processing ................................................................................................................... 103 9.1. Simple text manipulation ............................................................................................ 103 v vi Slackware Linux Basics 9.2. Regular expressions ................................................................................................... 118 9.3. grep ........................................................................................................................ 120 10. Process management ........................................................................................................... 123 10.1. Theory ................................................................................................................... 123 10.2. Analyzing running processes ..................................................................................... 126 10.3. Managing processes ................................................................................................. 127 10.4. Job control ............................................................................................................. 129 III. Editing and typesetting ............................................................................................................... 133 11. LaTeX ............................................................................................................................. 137 11.1. Introduction ...........................................................................................................