Introduction to Linux

A Hands on Guide

Machtelt Garrels

Garrels.be


                        
                    

ISBN 90-808529-1-0

20100512


Table of Contents

Introduction
Why this guide?
Who should read this book?
New versions and availability
Revision History
Contributions
Feedback
Copyright information
What do you need?
Conventions used in this document
Organization of this document
1. What is Linux?
History
UNIX
Linus and Linux
Current application of Linux systems
The user interface
Is Linux difficult?
Linux for non-experienced users
Does Linux have a future?
Open Source
Fifteen years of experience at your service
Properties of Linux
Linux Pros
Linux Cons
Linux Flavors
Linux and GNU
GNU/Linux
Which distribution should I install?
Summary
Exercises
2. Quickstart
Logging in, activating the user interface and logging out
Introduction
Graphical mode
Text mode
Absolute basics
The commands
General remarks
Using Bash features
Getting help
Be warned
The man pages
More info
Summary
Exercises
Connecting and disconnecting
Passwords
Directories
Files
Getting help
3. About files and the file system
General overview of the Linux file system
Files
About partitioning
More file system layout
Orientation in the file system
The path
Absolute and relative paths
The most important files and directories
The most important configuration files
The most common devices
The most common variable files
Manipulating files
Viewing file properties
Creating and deleting files and directories
Finding files
More ways to view file content
Linking files
File security
Access rights: Linux's first line of defense
The tools
Summary
Exercises
Partitions
Paths
Tour of the system
Manipulating files
File permissions
4. Processes
Processes inside out
Multi-user and multi-tasking
Process types
Process attributes
Displaying process information
Life and death of a process
SUID and SGID
Boot process, Init and shutdown
Introduction
The boot process
GRUB features
Init
Init run levels
Shutdown
Managing processes
Work for the system admin
How long does it take?
Performance
Load
Can I do anything as a user?
Scheduling processes
Use that idle time!
The sleep command
The at command
Cron and crontab
Summary
Exercises
General
Booting, init etc.
Scheduling
5. I/O redirection
Simple redirections
What are standard input and standard output?
The redirection operators
Advanced redirection features
Use of file descriptors
Examples
Filters
More about grep
Filtering output
Summary
Exercises
6. Text editors
Text editors
Why should I use an editor?
Which editor should I use?
Using the Vim editor
Two modes
Basic commands
The easy way
Linux in the office
History
Suites and programs
Remarks
Summary
Exercises
7. Home sweet /home
General good housekeeping
Introduction
Make space
Your text environment
Environment variables
Shell setup files
A typical set of setup files
The Bash prompt
Shell scripts
The graphical environment
Introduction
The X Window System
X server configuration
Region specific settings
Keyboard setup
Fonts
Date and time zone
Language
Country-specific Information
Installing new software
General
Package formats
Automating package management and updates
Upgrading your kernel
Installing extra packages from the installation CDs
Summary
Exercises
Shell environment
Graphical environment
8. Printers and printing
Printing files
Command line printing
Formatting
The server side
General
Graphical printer configuration
Buying a printer for Linux
Print problems
Wrong file
My print hasn't come out
Summary
Exercises
9. Fundamental Backup Techniques
Introduction
Preparing your data
Moving your data to a backup device
Making a copy on a floppy disk
Making a copy with a CD-writer
Backups on/from jazz drives, USB devices and other removables
Backing up data using a tape device
Tools from your distribution
Using rsync
Introduction
An example: rsync to a USB storage device
Encryption
General remarks
Generate a key
About your key
Encrypt data
Decrypting files
Summary
Exercises
10. Networking
Networking Overview
The OSI Model
Some popular networking protocols
Network configuration and information
Configuration of network interfaces
Network configuration files
Network configuration commands
Network interface names
Checking the host configuration with netstat
Other hosts
Internet/Intranet applications
Server types
Mail
Web
File Transfer Protocol
Chatting and conferencing
News services
The Domain Name System
DHCP
Authentication services
Remote execution of applications
Introduction
Rsh, rlogin and telnet
The X Window System
The SSH suite
VNC
The rdesktop protocol
Cygwin
Security
Introduction
Services
Update regularly
Firewalls and access policies
Intrusion detection
More tips
Have I been hacked?
Recovering from intrusion
Summary
Exercises
General networking
Remote connections
Security
11. Sound and Video
Audio Basics
Installation
Drivers and Architecture
Sound and video playing
CD playing and copying
Playing music files
Recording
Video playing, streams and television watching
Internet Telephony
What is it?
What do you need?
Summary
Exercises
A. Where to go from here?
Useful Books
General Linux
Editors
Shells
X Window
Networking
Useful sites
General information
Architecture Specific References
Distributions
Software
B. DOS versus Linux commands
C. Shell Features
Common features
Differing features
Glossary
Index

List of Figures

1. Introduction to Linux front cover
1.1. OpenOffice MS-compatible Spreadsheet
2.1. Terminal window
2.2. Konqueror as help browser
3.1. Linux file system layout
3.2. Hard and soft link mechanism
4.1. Fork-and-exec mechanism
4.2. Can't you go faster?
4.3. Gnome System Monitor
8.1. Printer Status through web interface
9.1. Floppy formatter
10.1. Evolution mail and news reader
10.2. X-Chat
10.3. SSH X11 forwarding
11.1. XMMS mp3 player

List of Tables

1. Typographic and usage conventions
2.1. Quickstart commands
2.2. Key combinations in Bash
2.3. New commands in chapter 2: Basics
3.1. File types in a long list
3.2. Subdirectories of the root directory
3.3. Most common configuration files
3.4. Common devices
3.5. Color-ls default color scheme
3.6. Default suffix scheme for ls
3.7. Access mode codes
3.8. User group codes
3.9. File protection with chmod
3.10. New commands in chapter 3: Files and the file system
3.11. File permissions
4.1. Controlling processes
4.2. Common signals
4.3. New commands in chapter 4: Processes
5.1. New commands in chapter 5: I/O redirection
7.1. Common environment variables
7.2. New commands in chapter 7: Making yourself at home
8.1. New commands in chapter 8: Printing
9.1. New commands in chapter 9: Backup
10.1. The simplified OSI Model
10.2. New commands in chapter 10: Networking
11.1. New commands in chapter 11: Audio
B.1. Overview of DOS/Linux commands
C.1. Common Shell Features
C.2. Differing Shell Features