Setting Kernel Options

Because all Linux software runs atop the kernel, the kernel's performance, and hence its optimizations, is particularly important. What's more, the kernel's configuration tools enable you to set its optimizations from a menu. Figure 1.1 shows this menu, obtained by typing make xconfig in the kernel source directory, for a 2.5-series kernel. Figure 1.1 The Linux kernel provides many options related to the CPU. Figure 1.1 The Linux kernel provides many options related to the CPU. The Processor...

Choosing the Right FTP Server

FTP is an old protocol, and numerous implementations of it have sprung up over the years. These servers vary in many details however, they all serve the same protocol, and they all look very much alike to their users. FTP server options for Linux include ProFTPd This server, headquartered at http proftpd.org, is one of the more popular of the very complex FTP servers. It ships with most major Linux distributions. Its configuration file is modeled after that of Apache, and the server supports...

File Recovery Tools

Undelete utilities for Linux are few and far between. The Linux philosophy is that users shouldn't delete files they really don't want to delete, and if they do, they should be restored from backups. Nonetheless, in a pinch there are some tricks you can use to try to recover accidentally deleted files. Note Low-level disk accesses require full read (and often write) privileges to the partition in question. Normally, only root has this access level to hard disks, although ordinary users may have...

Deleting Files

The rm command deletes (removes) files. Its syntax is shown here rm options files This command accepts many of the same options as cp, In, and mv. Specifically, from Table 5.2, -f, -i, and -r work with rm. Unlike some operating systems' file-deletion tools, rm is permanent Linux doesn't store deleted files in any sort of trash can folder. Chapter 12 provides pointers to tools and utilities you can use to recover deleted files or to implement a holding area to prevent files from being...

NFS Kernel and Package Options

Every major Linux distribution ships with an NFS server called rpc.nfsd. In most distributions, this server is part of the nfs-utils package, but Debian places it in the nfs-kernel-server package. These standard servers rely on NFS server support that's built into the kernel, as described shortly. Older NFS servers did not rely on this support, and such servers are still available on some distributions. For instance, Debian's nfs-user-server runs entirely in user space without taking advantage...

Emergency Restore Procedures

Restoring data from a backup is fairly straightforward when your system is fundamentally intact and you just need to recover a handful of lost files you run the backup software in reverse, as it were. For instance, you use tar's -extract command rather than the -create command. In the case of tar, you must specify the files or directories you want to recover on the command line, or else the system will attempt to recover everything. For instance, you might type these commands to restore the...

Types of Incremental Backup

In describing incremental backup schemes, three major types of backups come into play Full Backup A full backup contains all the files on a system, or at least all the files that are important. (Full backups may deliberately omit the contents of temporary directories such as tmp, for instance.) If you perform only full backups, you can restore anything or everything from the system using just one backup medium or set of media but such backups take the most time and consume the most media space....

Improving Disk Performance

If Linux isn't running your disks in an optimal mode, you can use hdparm to adjust its settings. In some cases, you can apply driver-specific options to your ATA driver. Finally, one issue of disk performance doesn't relate to speed, but it is important to laptop users energy use. You can configure the disks to spin down when they haven't been accessed for some time, thereby saving energy. Just as hdparm can read disk parameters, it can write them. Table 2.3 summarizes some of the parameters...

Selecting an Appropriate Desktop Environment

Depending on your Linux distribution and installation options, chances are good your system has more than one desktop environment available. The most common desktop environments are KDE The K Desktop Environment (KDE http www.kde.org) is one of the most popular desktop environments for Linux. It's the default desktop environment for Mandrake and SuSE. It's built atop the Qt widget set, and it includes many powerful tools that integrate together very well. It's described in more detail in the...

Recovering Deleted Files

Perhaps the most common type of filesystem problem is files that are accidentally deleted. Users frequently delete the wrong files or delete a file only to discover that it's actually needed. Windows system users may be accustomed to undelete utilities, which scour the disk for recently deleted files in order to recover them. Unfortunately, such tools are rare on Linux. You can make undeletion easier by encouraging the use of special utilities that don't really delete files, but instead place...

Setting the Text Resolution

One key attribute of graphical video modes as used by X is their resolution how many pixels are displayed, both horizontally and vertically. Text mode, too, sets a specific resolution. The combination of this resolution and the size of the characters that make up the font determine how many characters can be displayed on the screen. Therefore, one way to adjust the number of characters displayed on the screen is to adjust the underlying resolution. There are two ways to do this Modifying the...