Slackware Linux Basics

  • View
    218

  • Download
    2

Embed Size (px)

Text of Slackware Linux Basics

  • Slackware Linux Basics

    For Slackware Linux 12.0

    Danil de Kok

  • Slackware Linux Basics: For Slackware Linux 12.0by Danil de Kok

    Published Sun Jan 20 19:45:13 CET 2008Copyright 2002-2008 Danil 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 IMPLIEDWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FORA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESSINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ORTORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS BOOK, EVEN IF ADVISEDOF 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.

  • v

    Table of ContentsPreface ........................................................................................................................................... xiiiI. Getting started ................................................................................................................................ 1

    1. About this book ...................................................................................................................... 51.1. Availability ................................................................................................................. 51.2. Conventions ................................................................................................................ 5

    2. An introduction to Slackware Linux ........................................................................................... 72.1. What is Linux? ............................................................................................................ 72.2. What is GNU/Linux? .................................................................................................... 72.3. What is Slackware Linux? ............................................................................................. 72.4. The UNIX philosophy ................................................................................................... 82.5. Free and open source software ........................................................................................ 82.6. Slackware Linux 12.0 features ........................................................................................ 82.7. Getting Slackware Linux ............................................................................................... 9

    3. Sources of help ..................................................................................................................... 113.1. On your system .......................................................................................................... 113.2. On the Internet ........................................................................................................... 12

    4. General concepts ................................................................................................................... 154.1. Multitasking ............................................................................................................... 154.2. Filesystem hierarchy .................................................................................................... 164.3. Devices ..................................................................................................................... 17

    5. Installing Slackware Linux ...................................................................................................... 195.1. Booting the installation CD-ROM .................................................................................. 195.2. Partitioning a hard disk ................................................................................................ 205.3. Installing Slackware Linux ........................................................................................... 21

    6. Custom installation ................................................................................................................ 436.1. Partitioning a hard disk ................................................................................................ 436.2. Initializing and mounting filesystems ............................................................................. 436.3. Installing packages ...................................................................................................... 456.4. Post-install configuration .............................................................................................. 456.5. Automated installation script ......................................................................................... 48

    II. Slackware Linux Basics ................................................................................................................. 537. The shell ............................................................................................................................. 57

    7.1. Introduction ............................................................................................................... 577.2. Executing commands ................................................................................................... 577.3. Moving around ........................................................................................................... 587.4. Command history ....................................................................................................... 637.5. Completion ................................................................................................................ 637.6. Wildcards .................................................................................................................. 647.7. Redirections and pipes ................................................................................................. 65

    8. Files and directories .............................................................................................................. 678.1. Some theory .............................................................................................................. 678.2. Analyzing files ........................................................................................................... 708.3. Working with directories .............................................................................................. 758.4. Managing files and directories ...................................................................................... 768.5. Permissions ............................................................................................................... 788.6. Finding files .............................................................................................................. 868.7. Archives .................................................................................................................... 938.8. Mounting filesystems .................................................................................................. 958.9. Encrypting and signing files ......................................................................................... 97

    9. Text processing ................................................................................................................... 1039.1. Simple text manipulation ............................................................................................ 103

  • vi Slackware Linux Basics

    vi

    9.2. Regular expressions ................................................................................................... 1189.3. grep ........................................................................................................................ 120

    10. Process management ........................................................................................................... 12310.1. Theory ................................................................................................................... 12310.2. Analyzing running processes ..................................................................................... 12610.3. Managing processes ................................................................................................. 12710.4. Job control ............................................................................................................. 129

    III. Editing and typesetting ............................................................................................................... 13311. LaTeX ............................................................................................................................. 137

    11.1. Introduction ............................................................................................................ 13711.2. Preparing basic LaTeX documents .............................................................................. 1