Slackware Linux Basics

For Slackware Linux 12.0

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.

Thu Jul 3 18:24:11 CEST 2008


Table of Contents

Preface
I. Getting started
1. About this book
1.1. Availability
1.2. Conventions
2. An introduction to Slackware Linux
2.1. What is Linux?
2.2. What is GNU/Linux?
2.3. What is Slackware Linux?
2.4. The UNIX philosophy
2.5. Free and open source software
2.6. Slackware Linux 12.0 features
2.7. Getting Slackware Linux
3. Sources of help
3.1. On your system
3.2. On the Internet
4. General concepts
4.1. Multitasking
4.2. Filesystem hierarchy
4.3. Devices
5. Installing Slackware Linux
5.1. Booting the installation CD-ROM
5.2. Partitioning a hard disk
5.3. Installing Slackware Linux
6. Custom installation
6.1. Partitioning a hard disk
6.2. Initializing and mounting filesystems
6.3. Installing packages
6.4. Post-install configuration
6.5. Automated installation script
II. Slackware Linux Basics
7. The shell
7.1. Introduction
7.2. Executing commands
7.3. Moving around
7.4. Command history
7.5. Completion
7.6. Wildcards
7.7. Redirections and pipes
8. Files and directories
8.1. Some theory
8.2. Analyzing files
8.3. Working with directories
8.4. Managing files and directories
8.5. Permissions
8.6. Finding files
8.7. Archives
8.8. Mounting filesystems
8.9. Encrypting and signing files
9. Text processing
9.1. Simple text manipulation
9.2. Regular expressions
9.3. grep
10. Process management
10.1. Theory
10.2. Analyzing running processes
10.3. Managing processes
10.4. Job control
III. Editing and typesetting
11. LaTeX
11.1. Introduction
11.2. Preparing basic LaTeX documents
IV. Electronic mail
12. Reading and writing e-mail with mutt
12.1. Introduction
12.2. Usage
12.3. Basic setup
12.4. Using IMAP
12.5. Signing/encrypting e-mails
13. Sendmail
13.1. Introduction
13.2. Installation
13.3. Configuration
V. System administration
14. User management
14.1. Introduction
14.2. Adding and removing users
14.3. Avoiding root usage with su
14.4. Disk quota
15. Printer configuration
15.1. Introduction
15.2. Preparations
15.3. Configuration
15.4. Access control
15.5. Ghostscript paper size
16. X11
16.1. X Configuration
16.2. Window manager
17. Package Management
17.1. Pkgtools
17.2. Slackpkg
17.3. Getting updates through rsync
17.4. Tagfiles
18. Building a kernel
18.1. Introduction
18.2. Configuration
18.3. Compilation
18.4. Installation
19. System initialization
19.1. The bootloader
19.2. init
19.3. Initialization scripts
19.4. Hotplugging and device node management
19.5. Device firmware
20. Security
20.1. Introduction
20.2. Closing services
21. Miscellaneous
21.1. Scheduling tasks with cron
21.2. Hard disk parameters
21.3. Monitoring memory usage
VI. Network administration
22. Networking configuration
22.1. Hardware
22.2. Configuration of interfaces
22.3. Configuration of interfaces (IPv6)
22.4. Wireless interfaces
22.5. Resolving
22.6. IPv4 Forwarding
23. IPsec
23.1. Theory
23.2. Linux configuration
23.3. Installing IPsec-Tools
23.4. Setting up IPsec with manual keying
23.5. Setting up IPsec with automatic key exchanging
24. The Internet super server
24.1. Introduction
24.2. Configuration
24.3. TCP wrappers
25. Apache
25.1. Introduction
25.2. Installation
25.3. User directories
25.4. Virtual hosts
26. BIND
26.1. Introduction
26.2. Making a caching nameserver

List of Figures

4.1. Forking of a process
4.2. The filesystem structure
5.1. The cfdisk parition tool
5.2. The setup tool
5.3. Setting up the swap partition
5.4. Selecting a partition to initialize
5.5. Formatting the partition
5.6. Selecting a filesystem type
5.7. Selecting the source medium
5.8. Selecting the disk sets
5.9. Installing the kernel
5.10. Creating a bootdisk
5.11. Selecting the default modem
5.12. Enabling hotplugging
5.13. Selecting the kind of LILO installation
5.14. Choosing the framebuffer resolution
5.15. Adding kernel parameters
5.16. Choosing where LILO should be installed
5.17. Configuring a mouse
5.18. Choosing whether GPM should be started or not
5.19. Choosing whether you would like to configure network connectivity
5.20. Setting the host name
5.21. Setting the domain name
5.22. Manual or automatic IP address configuration
5.23. Setting the IP addres
5.24. Setting the netmask
5.25. Setting the gateway
5.26. Choosing whether you want to use a nameserver or not
5.27. Setting the nameserver(s)
5.28. Confirming the network settings
5.29. Enabling/disabling startup services
5.30. Choosing whether the clock is set to UTC
5.31. Setting the timezone
5.32. Choosing the default window manager
5.33. Setting the root password
5.34. Finished
7.1. Standard input and output
7.2. A pipeline
8.1. The structure of a hard link
8.2. The structure of a symbolic link
10.1. Process states
22.1. The anatomy of an IPv6 address
22.2. Router example

List of Tables

5.1. Installation kernels
7.1. Moving by character
7.2. Deleting characters
7.3. Swapping characters
7.4. Moving by word
7.5. Deleting words
7.6. Modifying words
7.7. Moving through lines
7.8. Deleting lines
7.9. Bash wildcards
8.1. Common inode fields
8.2. Meaning of numbers in the mode octet
8.3. less command keys
8.4. System-specific setfacl flags
8.5. Parameters for the '-type' operand
8.6. Archive file extensions
9.1. tr character classes
10.1. The structure of a process
11.1. LaTeX document classes
11.2. LaTeX font styles
17.1. Tagfile fields
22.1. Important IPv6 Prefixes
26.1. DNS records