Linux Sea

Sven Vermeulen

You are free to share (copy, distribute and transmit) the work as well as remix (adapt) the work under the conditions of the Creative Commons Attribution Noncommercial Share Alike 2.0 license, available at http://creativecommons.org/licenses/by-nc-sa/2.0/be/deed.en

Abstract

The book "Linux Sea" offers a gentle yet technical (from end-user perspective) introduction to the Linux operating system, using Gentoo Linux as the example Linux distribution. It does not nor will it ever talk about the history of the Linux kernel or Linux distributions or dive into details that are less interesting for Linux users.

For various topics, the online Gentoo Handbook offers a very detailed approach and as such is mandatory reading for any Gentoo Linux user who wants to know the full power of this Operating System. Although there is definitely overlap between "Linux Sea" and the online Gentoo Handbook, "Linux Sea" is by no means meant to replace the online Gentoo Handbook.

"Linux Sea" will attempt to focus on topics that everyday users would probably need to know to continue working with Gentoo Linux.

The version you are reading currently is v1.17 and has been generated on 2014/06/17. PDF and ePUB versions are available as well.


Table of Contents

1. What is Linux?
Introduction
The Anatomy of an Operating System
Kernel
System Libraries
System Tools
Development Tools
End User Tools
Okay, I bite, What is this GNU?
Linux as the Kernel of the Linux Operating System
Linux Operating Systems: Distributions
What is a Distribution?
What does a Distribution Provide?
What is an Architecture?
Myths Surrounding Linux
Myths
Weaknesses
Exercises
Further Resources
2. How does Free Software affect Linux?
Introduction
Free Software
What are Software Licenses?
What Licenses Exist?
Free Software isn't Non-Commercial
So Linux is Free?
Development Model
Multi-Project Development
Transparent Development
Fast Release Cycles
Large Documentation Base
Software Life Cycle
Open Standards
File system Hierarchy Standard
Linux Standard Base
Free Desktop Specifications
Exercises
Further Resources
3. The Role of the Community
Introduction
Communities
Local Communities
Online Communities
Support
Documentation Guides
Internet and Usenet Forums
Mailinglists
Chat
Real-life Meetings
Conferences
FOSDEM
FOSS.IN
LinuxTag
Exercises
Resources
4. Running Linux
Introduction
System Architecture
User Accounts
Processes
Files and File Structure
Permissions
Using the Command Line
Navigating
Listing Content
Basic File Manipulation
Editing Text Files
Linking Files and Directories
File / Command Completion
Switching Terminals
Logging Out
Shutting Down
Getting Help
Man Pages
Info Pages
Immediate Syntax Help
Package-provided Documentation
Online Documentation
Exercises
Further Resources
5. The Linux File System
Introduction
Structure
Mounting File Systems
The Linux File System Locations
The Root File System /
The Variable Data Location /var
The Userland Location /usr
The Home Location /home
Permissions and Attributes
Read, Write and Execute
Attributes
Locating Files
mlocate
find
Exercises
6. Working with Processes
Process Trees
Parent and Child Relationships
Process Ownership
Viewing Process Information
Backgrounding Processes
Process Behaviour
Command Return Codes
Priority and Niceness
Sending Signals (and Killing Processes)
Exercises
Further Resources
7. Configuring a Linux Kernel
Introduction
Obtaining Hardware Information
Introduction
Device Information
Configuring a Linux Kernel
Kernel Modules
Using Gentoo's genkernel Script
Manually Configuring a Kernel
Building a Linux Kernel
Rebuilding a Kernel
Initial ram file systems
Configuring the Boot Loader
Installing GRUB
Configuring GRUB
Troubleshooting Boot Failures
When a system fails to boot...
Kernel Boot Failures
System Boot Failures
Exercises
8. Hardware Support
Introduction
ALSA - Advanced Linux Sound Architecture
Installing ALSA
Basic ALSA Configuration
Keeping your Changes
Using Sound Servers
CUPS - former "Common Printing Unix System"
Installing CUPS
Configuring CUPS
Managing Device Files
Further Resources
9. Software Management
Gentoo Portage
Introduction
Package Management: Portage
Package Structure: Ebuilds
USE Flags
Maintaining your Software Stack
Obtaining the Latest Portage Tree
Getting Gentoo News
Querying for Software
Enabling Installation Logs
Installing New Software
Updating your System
Uninstalling Software
Advanced Software Management
Package States
Unmasking Packages
Switching System Profiles
Using Third Party Software Repositories
When Things Go Wrong
Portage Refuses To Install A Package
Resolving Build Failures
Changing Configuration Files
Configuration File Updates
dispatch-conf
Modifying Build Decisions
Languages
Video Cards
Compiler Directives
Portage Behaviour
Specific software choices
Fixing Postinstall Problems
Dynamic Linking Inconsistency
Exercises
10. User Management
Introduction
Adding or Removing Users
User Account Information
Group Information
Creating or Deleting Users
Adding or Removing Users to/from Groups
Setting and Changing Passwords
Elevating User Privileges
Switching User
Assigning Specific Privileged Commands
Exercises
11. Network Management
Introduction
Supporting your Network Card
Native Driver Support
Support through Windows Drivers
Verify your Networking Abilities
Wired Network Configuration
Configuring the Wired Network
Wireless Network Configuration
Supporting your Network Card
Using Wireless Extensions Support (wireless-tools)
Using the New Wireless Extensions Support (iw)
Using wpa_supplicant for WPA Encrypted Networks
User-friendly Network Configuration Tools
Wicd
Firewall Configuration
Sharing your Internet Connection
Forwarding Requests
Distributing IP Addresses
Allowing Remote Access
Secure Shell
Secure File Transfer
Further Resources
12. Service Management
Introduction
Services at System Boot / Shutdown
Init Scripts
Gentoo Runlevels
List of Default Services
Service Configurations
General Service Configuration
Specific Service Configuration
Softlevel States
Bootlevel States
13. Storage Management
Introduction
Hard Disk Partitions
Partition Layout
Partitioning a Disk
Placing a File System on a Partition
Using the Partitions
Using File System Labels or IDs
Removable Media
Mounting Removable Media
Network File Systems
NFS
Samba
Managing Disk Space
Finding Top Disk Space Consumers
Cleaning Up Gentoo-related Files
Resizing Partitions
Limiting User Files
Resources
14. System Management
Introduction
Environment Variables
List of Environment Variables
How to Set an Environment Variable
Managing Environment Entries
Location Specific Settings
Locale Settings
Keyboard Settings
Time Settings
System Scheduler
15. Installing Gentoo Linux
Introduction
System Requirements
Booting a Linux Environment
Disk Setup
Installing Gentoo Base
Configuring the System
Preparing the Installation Environment
Chrooting
Configuring Portage
Configuring the Linux Kernel
Configuring the System
Installing System Tools
Configuring the Boot Loader
Finishing Up
16. Introducing the Graphical Environment
Introduction
The Structure of X
The X Window System
Installing Xorg
Window Managers
Installing a Window Manager
Activating a Window Manager
Desktop Environments
GNOME
KDE
XFCE4
Activating a Desktop Environment
Logging on Graphically
Install Graphical Logon Manager
Setup the Default Graphical Environment
Supporting 3D Acceleration
17. Log File Management
Introduction
System Logger
/dev/log
Log Event Meta Information
System Logger Configuration
Non-Syslog Log Files
Xorg Logging
Gentoo Related Logs
Maintaining Log Files with Logrotate
Installing Logrotate
Configuring Logrotate
Maintaining Log Files with Cron
18. Taking Backups
Introduction
Poor Man's Backup
System Settings
User Settings
Sample Script
More Managed Backups
Backup Ninja
Bare Metal Recovery
PartImage
Stage4/5/... Installation
19. Using A Shell
Introduction
Chaining Commands
Running Multiple Commands
Grouping Commands
Storing Commands
Advanced Shell Scripting
Want more?
20. Tips and Answers to Questions
What is Linux?
How does Free Software affect Linux?
The Role of the Community
Running Linux
The Linux File System
Working with Processes
Configuring a Linux Kernel
Hardware Support
Software Management
User Management
Network Management
Service Management
Storage Management
System Management
Introducing the Graphical Environment
Installing Gentoo Linux
Glossary
Index

List of Figures

4.1. nano editor opened with the TODOfile as its working document
5.1. Two partitions used for the file system structure
16.1. A possible representation of how X is structured

List of Tables

4.1. Short summary of frequently used actions for the less pager
10.1. Incomplete (!) list of system groups
13.1. Example partitioning scheme for a Linux desktop
14.1. Locale variables supported on a Linux system
14.2. List of settings used in a locale definition
14.3. Crontab columns
15.1. Example partition layout
17.1. System logger importance levels