User:SwifT/Complete Handbook

This handbook extends and expands the wiki's coverage of several subjects related to Linux in general and the Gentoo Linux operating system in particular. It is written with the casual user in mind; the sort of user who wants to learn about Linux rather than just follow instructions to the letter. It is a community-driven documentation effort, so if you want to be conservative and safe -- especially on the installation -- please consult the officially maintained Gentoo Handbooks before reading this one.

This book offers basic information related to Gentoo Linux and the applications it supports. Because there are often architecture-specific commands and features, this handbook is also available for the following architectures:


 * The Complete AMD64 Handbook focuses on the x86_64 architecture

This more general version of the Complete Handbook uses the x86_64 architecture as its example architecture.

Introduction to Linux
Before embarking on the specifics of Gentoo Linux, a gentle introduction to Linux and free software in general is definitely in place.


 * What is Linux?
 * What is Linux exactly? How does this all fit in "Free Software"? What is a distribution and why would anyone care? How is Linux developed? What can be expected from it? All that is covered in this chapter.


 * Users and the Linux file system
 * Linux is built upon the UNIX knowledge and concepts. This means it is fairly robust and uses a very logical approach to files, users and such. But for most people, this logical approach is just what seems the most illogical since they are not used to it. In this chapter, users are informed about how Linux sees a multi-user environment and what the Linux file system is structured like.


 * Freedom, support, and finances
 * The most powerful asset of the Linux operating system is the freedom it gives the user. But many folks are afraid that this freedom comes with a price: no support, no company backing up Linux. This is all FUD (Fear, Uncertainty, Doubt) and well explained in this chapter.


 * Staying up to date
 * With the decentralized development model that Linux uses, keeping a system up to date might seem like a huge effort. Indeed, it is, but it is covered by the various distributions (such as Gentoo). However, because of the openness that the development model imposes, users have conflicting feelings about stability and the differences between all version models. This chapter explains what all the differences between version models are.


 * Making a choice
 * Now that most non-technical stuff is covered, it is time to make choices. Is Linux a good choice? What distribution? What graphical environment? What mail client? In this chapter the various differences between major distributions are discussed. The chapter also explains that, once a distribution is selected, all other choices are interchangeable.


 * Finding information
 * There is a lot of information available; in this chapter a quick overview is provided on the available resources, how to use them for queries and what can be done to contribute to them.


 * So far so good
 * Now that the introduction to Linux has ended, this section discusses the next few parts and the syntax used throughout this document.

Installing Gentoo
So the decision is made to install Gentoo. That's great, so how to continue? Installing Gentoo is a breeze, but not a soft one. Users need a fair knowledge of the Linux environment if they want to get it right from the first time. In this part, the Gentoo installation is documented using the available Gentoo media.


 * Versions, media, and installation concerns
 * Gentoo provides installation media, with specific versions, for specific architectures, for specific installation methods. This chapter explains how to pick the right media for a system.


 * Starting from a minimal environment
 * The start of every Gentoo installation process begins with a minimal Linux environment, allowing to extract a basic Gentoo environment on the disk(s). This chapter also covers the use of some important tools that can be used to assist during an installation.


 * Preparing the network
 * After familiarizing with the environment, it is time to get the network up and running. The chapter documents how a network is set up, what TCP/IP is and how to deal with networking on Linux, including wireless networks.


 * Putting the minimal environment in place
 * In this chapter the disk(s) are prepared to store the Gentoo Linux environment. In it, a few additional storage concepts (LVM2, RAID) are covered as well, but the real use of these technologies is postponed for later. Finally, a minimal Gentoo environment is extracted on the disks.


 * Building the system
 * With the minimal environment now up and running, the basic configuration directives are set up, and the Gentoo system is build until it is bootstrapped and has the core system packages available.


 * Building the Linux kernel
 * The core of any Linux operating system is the kernel. Configuring a kernel might seem like a difficult task, but with the proper support, documentation (and over time experience), it hardly is a challenge anymore. In this chapter the kernel configuration and compilation is documented, with both the automatic approach using genkernel, as well as the manual approach with the kernel configuration dialog.


 * Configuring the boot process
 * The next step is to configure the boot process. The boot process covers the boot loader tool, which loads the Linux kernel in memory, and the init process which governs all the applications and processes that should start on a Linux system.


 * Configuring the system
 * Most of the system's configuration is stored inside /etc. In this almost final chapter the majority of system configurations (such as the file system table, networking stuff, user accounts, ...) are documented.


 * Finishing off
 * Now that everything is (hopefully) configured correctly, the Gentoo Linux operating system is booted, resulting in a deployed, minimal Gentoo installation. This chapter gives pointers on the next possible steps (be it desktop configuration or server configuration).

Gentoo Linux for the desktop user
Most Gentoo users have a Gentoo-powered desktop system, yet are often unaware of the massive tools and helpful features that Linux offers to increase their desktop experience. In this part pointers to various tips and tricks are documented, but also best practices for desktop users.


 * Graphical Linux
 * Linux is not an operating system where command-line utilities must be used. Once the system is installed, any user should be able to use it without any knowledge of command-line utilities. Indeed, this is perfectly possible, but requires some configuration. This chapter gives an introduction to popular graphical environments and provides pointers to its configuration.


 * Plug and play
 * A laptop detects an open wireless network and authenticates itself immediately. An USB key is plugged in which gets mounted immediately so the user can download the latest Gentoo release on it. During work, the calendar synchronises with friends and colleagues while the laptop tries to consume as little power as possible because it is working on batteries. No, this is no utopia...


 * Software collaboration
 * Open standards allow for easy integration of different software tools. However, the race for the best open standard hasn't been won, so various tools only work with one standard while other tools use a different one. This chapter gives a quick overview of the various collaboration-related standards and the applications (or libraries which they use) that make use of them.

Gentoo Linux for enterprise environments
Enterprises require more than just a stable operating system. Depending on their requirements, a system should be high-available, have a high throughput, connect with legacy systems, have a low maintenance cost, requires zero manual configuration steps, etc. This part will attempt to discuss various interesting topics that might help you get more out of Gentoo Linux.


 * Software RAID
 * If you need a very low-cost system but still want redundancy, using software RAID is a minimal requirement. In this chapter we will describe how to use software RAID within Gentoo Linux.


 * Print server : High quality printing is a requirement for every office. Linux makes a fine print server, capable of interacting with all possible applications and operating systems.

System Administration
Once a system is set up, the next concern is to decide how to administer the system. Some people have made system administration their full-time job. In this section, administration is kept to a manageable minimum without losing flexibility.


 * Software management
 * Gentoo's Portage is a powerful software management tool with lots of features. Not only can the user easily install and remove software, rebuild tools when they are affected by changes or update the system entirely, it also supports prebuilt packages and different repositories.


 * Log files
 * Not many resources talk about log files. Most documents assume that log files are mentioned by the application documentation, yet many applications just inform the user what information can be found in the logs and that isn't sufficient for a good log management policy. Log rotation, event filtering, summary creation, ... are all aspects that this chapter covers.


 * Centralized system management
 * When a system is part of a larger environment, most users will set up and maintain the environment from a single location. Although one can use SSH to log on to other systems, more advanced tools exist that offer a wide variety of features.

Performance Tuning
No system is equal, so many systems have one or more performance bottlenecks due to general settings that aren't as optimal for their systems as they are for others. System performance can be increased on many areas as long as the administrator understands why these areas are bottlenecks and what sacrifices need to be made to increase the throughput.


 * Input/Output performance
 * Storage performance. If there is one device in the system that has the highest importance but one of the lowest access times, it is the storage. Disks aren't fast, network storage isn't much better and memory disks are generally too small to contain an entire system. So what can be done to increase the IO performance?


 * Network performance
 * If a system is on a 28.8 kbps network, then everyone will find that it is slow. Many people still think their network is slow while they're using a 1 Gbps network. By identifying the bottlenecks in the network and designing a good topology, the performance of a network can be increased to a good level.


 * Rendering performance
 * A gamer's dream: screens and graphical cards that render 3D images so detailed and so fast that it seems that the end user is looking through a window. Of course, this isn't achievable yet, but it is possible to tune the 3D performance of the graphics card. Of course, this section looks at 2D performance as well.


 * Software profiling
 * Programmers don't always write the most performant code; perhaps because they rely on the compiler to enhance the machine code or because they want to write clean and maintainable code, setting their priorities elsewhere. Using profiling tools, developers can find out where in the software the performance bottlenecks may lie.


 * User observed performance
 * Lately, developers have come to the conclusion that even the fastest solution can lose against a less performant system - at least if a human being is to observe and judge. Many interesting projects have emerged where design patterns and guidelines are discussed that try to embrace the users thoughts on speed and performance.