User:SwifT/Complete Handbook

This handbook tries to extend on various subjects regarding Linux and the Gentoo Linux operating system. It is written with the casual user in mind 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 perfectly safe in your quests (especially on the installation), please consult the Gentoo Handbooks first.

Introduction to Linux
This handbook tries to extend on various subjects regarding Linux and the Gentoo Linux operating system. It is written with the casual user in mind who wants to learn about Linux rather than just follow instructions to the letter. Although we hope this handbook will eventually be complete, it currently lacks so many important subjects that it is far from ready yet to be officially published.


 * 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 you decided to install Gentoo. That's great, so how to continue? Installing Gentoo is a breeze, but not a soft one. You need to have a fair knowledge of the Linux environment if you want to get it right from the first time. In this part, we discuss how to install Gentoo 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 informs you how to pick the right media for your system.
 * Starting from a minimal environment : The start of every Gentoo installation process begins with a minimal Linux environment, allowing you to extract a basic Gentoo environment on your disk. Regardless of what minimal environment you are in, you need to know a few basic things about the system. This chapter covers the use of important tools.
 * Preparing the network : When you are known to the minimal environment, it is time to get the network up and running. We will inform you 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 we prepare your disk(s) to store the Gentoo Linux environment. We will cover a few additional storage concepts (LVM2, RAID) but the real use of these technologies is postponed for later. Next, we store a minimal Gentoo environment on your disks.
 * Building the system : Once the minimal environment was available, we took the dive and chrooted in it. Now, we'll set up the basic configuration directives, build the Gentoo system 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 once you get to know how it works, it hardly is a challenge anymore. In this chapter we will discuss how to configure and build your kernel, either automatically using genkernel, or manually 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 we describe what you should configure prior to rebooting (such as the file system table, networking stuff, user accounts, ...). It is important to read this entire chapter completely.
 * Finishing off : Now that everything is (hopefully) configured correctly, we reboot in the Gentoo Linux operating system to discover that we have a nice running minimal environment. Now, where to go from here? You obviously can't work immediately since nothing is installed yet...

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 you'll find pointers to various tips and tricks, 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 : Your laptop detects an open wireless network and authenticates itself immediately. You plug in your USB key which gets mounted immediately so you can download the latest Gentoo release on it. While you are at it, your calendar synchronises with your friends while your 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.
 * Logical volume management : With LVM, storage concerns can be tackled easily since your files are located on top of a specific layer, able to hide the complexity of storage from the file system. Learn how to store files across various file systems, moving data without the need to put the system in a frozen state, take live backups without having your data touched while you are busy, ... and all that using LVM2.
 * Backup systems : You don't want to lose your files, but eventually you will. Having backups at hand is a prerequisite for good system householding, but is also often overlooked or deemed less important. This chapter will cover a few basics on backups and proposes a few solutions that will help you keep your data safe.
 * 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 your system is set up, your next concern is to decide how to administer the system. Some people have made system administration their full-time job. We'll try to keep the administration to a minimum without losing flexibility.


 * Software management : Gentoo's Portage is a powerful software management tool with lots of features. Not only can you easily install and remove software, rebuild tools when they are affected by changes or update your 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 you what information you can find 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 you administer more than one system, it might be beneficial to set up and maintain your environment from a single location. You can use SSH to log on to other systems, but 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. You can increase your systems performance on many areas as long as you understand why they are bottlenecks and what sacrifices you need to make to increase the throughput.


 * Input/Output performance : Storage performance. If there is one device in your system that has the highest importance but one of the lowest access times, it is your storage. Disks aren't fast, network storage isn't much better and memory disks are generally too small to contain your entire system. So what can you do to increase the IO performance?
 * Network performance : If you are on a 28.8 kbps network, you'll always 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 your network and designing a good topology, you can increase the performance of your network to a good level.
 * Rendering performance : A gamers wet dream: screens and graphical cards that render 3D images so detailed and so fast that it seems that you're looking through a window. Of course, this isn't achievable yet, but it is possible to tune the 3D performance of your card. Of course, we'll take a look at 2D rendering 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, you 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.

Appendix: Architecture Specific Information
Not all aspects of a Gentoo Linux system are similar on all architectures. Some small differences come up during and after the installation. This part will cover all architecture-specific information, nicely divided in separate chapters for each architecture.


 * Appendix: the x86 architecture : The x86 architecture covers all 32-bit Intel and Intel-clones, such as the various AMD processors (the K-series and Athlon/Duron), VIA and Cyrix. The CPU types range from the old (but functional) i386 to the latest Intel Pentium IV and AMD Athlons.