Fedora Linux Secrets

Disk Controller Types

The disk controller is the adapter card that acts as an intermediary between your PC's motherboard and one or more hard disk drives. Typically, you can connect up to two hard drives and two floppy drives to a single disk controller. The Small Computer System Interface (SCSI) controller is an exception to this norm you can connect as many as 7 or 15 SCSI devices (anything that has a SCSI interface, such as a disk drive, CD-ROM drive, tape drive, or scanner) in a series. Over the years, several...

Running Microsoft Office in Linux with Cross Over Office

You probably have Windows and Microsoft Office installed on your PC. When you decide to install Linux on the PC, you can, for a price, continue to run the key Microsoft Office applications from the GNOME or KDE desktop. The convenience of running Microsoft Office in Linux comes in the form of a commercial product called CrossOver Office. CrossOver Office, from CodeWeavers, is a software package that enables you to install your Microsoft Office applications (all versions of Office, including...

Understanding How a Cable Modem Works

How Modem Works

A box called a cable modem is at the heart of Internet access over the cable TV network. The cable modem takes digital data from your PC's Ethernet card and puts in an unused block of frequency (think of it as another TV channel, but instead of pictures and sound, this channel carries digital data). The cable modem places upstream data data that's being sent from your PC to the Internet in a different channel from that used for the downstream data that's coming from the Internet to your PC. By...

Table 214 Common File System Configuration Options

Enables Linux to read from the ADFS the Acorn Disc Filing System the standard file system of the RiscOS operating system that runs on Acorn's ARM-based Risc PC systems and the Acorn Archimedes systems. Answer y if you want Linux to read from ADFS partitions on hard drives and from ADFS floppy disks. Enables support for the Amiga Fast File System (AFFS), the file system used by Amiga systems since AmigaOS version 13 (34.20). Answer y if you need to read from and write to an Amiga FFS partition...

Running Commands in the Background or in Virtual Consoles

When using MS-DOS, you have no choice but to wait for each command to complete before you enter the next command. (You can type ahead a bit, but the MS-DOS system can hold only a few characters in its internal buffer.) Linux, however, can handle multiple tasks simultaneously. The only problem you may have is that the terminal or console is tied up until a command completes. If you work in a terminal window and a command takes too long to complete, you can open another terminal window and...

Playing Audio CDs

You need a special application to play audio CDs in the CD DVD drive. Both GNOME and KDE come with CD Players. Before using any CD Player program, make sure you unmount any CD currently in the drive use the umount dev cdrom command , remove the CD, and place an audio CD in the drive. To play the audio CD, you must also have a sound card and the appropriate sound drivers installed, as described in earlier sections of this chapter. If you are using the GNOME desktop, you can play audio CDs by...

Understanding Environment Variables

The shell and other Linux commands need information to work properly. If you type a command that isn't one of that shell's built-in commands, the shell has to locate an executable file (whose name matches the command you type). The shell needs to know which directories to search for those files. Similarly, a text editor, such as vi, needs to know the type of terminal (even if the terminal happens to be a terminal window in GNOME or KDE). One way to provide this kind of information to a program...

Using sysctl to View and Set Kernel Parameters

As the entry for proc sys in Table 20-11 explains, you can change kernel parameters by writing to files in the proc sys directory. This is one way to tune the system's performance. Linux also comes with the sbin sysctl program that enables you to read and write kernel parameters without having to overwrite files manually in the proc sys directory. In Chapter 13, you encounter an instruction that asks you to log in as root and enable IP forwarding in the kernel by typing the following command...

Running sed

The sed editor expects to read from the standard input and write to the standard output. You can provide a filename on the command line, but sed still writes the output to standard output. This means that sed does not change the file it edits. You can redirect the output to another file or to the original file, thereby changing that file. By default, sed applies each editing command globally to all lines in the file. You can, however, use line addresses or patterns to restrict the lines to...

Understanding the Zone File Format

The zone file typically starts with a number of directives, each of which begins with a dollar sign ( ) followed by a keyword. Two commonly used directives are TTL and ORIGIN. uses the TTL directive to set the default time to live (TTL) for subsequent records with undefined TTLs. The value is in seconds, and the valid TTLs are in the range 0 to 2147483647 seconds. In this case, the directive sets the default TTL as 86400 seconds (or one day). The time specified in the time-to-live directive...

Learning the Basics of sed Commands

All sed commands have the following general form The parts shown in square brackets are optional. The command is an editing command (similar to those for the ed editor) that specifies the action sed takes on a line. The address specifies the lines to which the commands apply. The exclamation mark ( ) applies the command to all lines that do not match the address. The arguments are needed by some editing commands, such as the w or r command, that read a file for which you have to provide the...

Window System Setup

Understanding the X Window Configuring X.Org X11 Using Examining the xorg.conf Understanding the Screen Section Understanding the Device Understanding the Monitor Computing a Running Trying Different Video Modes If you have used Apple Mac OS or Microsoft Windows, you are familiar with the convenience of a graphical user interface (GUI, pronounced gooey). In Linux, the GUI is not an integral part of the operating system. Instead, Linux distributions, such as Fedora Core, typically provide GNOME...

Understanding the Monitor Section

The Monitor section lists the technical specifications of the monitor the horizontal synchronization (or horizontal sync) frequency and vertical refresh rate. These two critical parameters of your monitor have the following meanings Horizontal synchronization frequency The number of times per second that the monitor can display a horizontal raster line, in kilohertz (kHz), referred to as HorizSync in the Monitor section. Vertical refresh rate or synchronization rate How many times a second the...

Computing a Mode Line

Although you can live with the VESA standard video modes defined in the X server, you may sometimes have to add a ModeLine manually to get a video mode to work for a specific video card monitor combination. You specify a ModeLine on a single line with the following syntax ModeLine name CLK HRES HSS HSE HTOT VRES VSS VSE VTOT flags You must fill in all arguments, except the last argument, which is an optional keyword that indicates the type of the mode. The flags field, for example, can be...

Commands and Options for SELinux

Many common Linux commands include options for viewing SELinux access control information. For example, to provide the fine-grained access control, SELinux requires that each file include a security context think of it as the security attributes of the file or directory. Adding contexts to the files is referred to as labeling the file system. The file system should already be labeled when you install Fedora Linux and enable SELinux. You can easily check the context of a file, a user, or a...

Manually Configuring the Sound Card

When you know the sound card type and the driver that you must load, it's a simple procedure to load the driver manually. All you have to do is log in as root and use the modprobe command with the following syntax where drivername is the name of the driver module to load. Thus, you can load the snd-intel8x0 driver by typing That's all you need to do. After loading the driver, you can verify that it's loaded by typing the Ismod command. For example, here are a few lines of output from the Ismod...

PC Card Terminology

As all laptop vendors have adopted PC Card slots, the PC Card market has experienced explosive growth. Thanks to the PCMCIA Standards, the PC Card devices can be used in any PC Card slot. As you use PC Cards, you'll run into some special terms, including the following Card information structure (CIS) Describes the characteristics and capabilities of a PC Card, so that the operating system or driver software can configure the card. CardBus An electrical specification that describes the use of...

Understanding the etcvsftpdvsftpdconf File

To learn what you can have in the etc vsftpd vsftpd.conf file and how these lines affect the vsftpd server's operation, start by looking at the etc vsftpd vsftpd.conf file that's installed by default. The comments in this file tell you what each option does. By default, vsftpd allows almost nothing. Through the options in etc vsftpd vsftpd.conf you can loosen the restrictions so that users can use FTP. It's up to you to decide how loose the settings should be. Note that most of the options are...

Understanding Pluggable Authentication Modules

A Pluggable Authentication Module (PAM) performs the actual MD5 encryption, described in the Learning the Role of Shadow Passwords section. PAM provides a flexible method for authenticating users on Linux systems. Through settings in configuration files, you can change the authentication method on the fly, without having to actually modify programs, such as login and passwd, which verify a user's identity. Linux uses PAM extensively, and the configuration files are in the etc pam.d directory of...

Cylinders Heads and Sectors

The physical organization of the disk is expressed in terms of cylinders, heads, and sectors. A hard disk consists of several platters of magnetic material. In physical terms, you can think of cylinder, head, and sector as follows A cylinder is a set of matching tracks on both sides of all the platters in the disk drive, where each track is one of a series of concentric rings on one side of a disk platter. The total number of heads is the number of sides of all the magnetic platters. A sector...

Linux Commands

This appendix presents alphabetically arranged reference entries for the most important Linux commands. The goal here is to provide you with an overview of all commands needed to manage files and directories, start and stop processes, find files, work with text files, and access online help. If you are looking for a command for a specific task, but don't know which command to use, you may find it helpful to browse through the commands by category. Table A-1 shows the Linux commands organized by...

Configuring the Master NIS Server

To configure the NIS server daemon, ypserv, you have to prepare the configuration file etc ypserv.conf. You can learn about the syntax of this file by reading its man page, which you can access by typing the command man ypserv.conf. Among other options, you can use the following option to specify that DNS should not be used to look up host names that are not in the maps of the etc hosts file You can also add other lines in etc ypserv.conf that specify access rules which hosts can access which...

Running the xinetd Superserver

The client server model requires that the server be up and running before a client makes a request for service. A simplistic idea would be to run all the servers and have them listen to their respective ports all the time. However, this idea is not practical because each server process would use up system resources in the form of memory and processor time. Besides, you don't really need all the services up and ready at all times. A smart solution to this problem is to run a single server,...

Configuring Servers to Start Automatically at Boot Time

Although you can start, stop, and restart servers manually by using the scripts in the etc rc.d init.d directory, you have to set up symbolic links in the scripts for an appropriate run level. For example, to start the DNS server named in run level 5, you need an S script in the run level 5 directory ( etc rc.d rc5.d). Furthermore, that S script should be a symbolic link to the etc rc.d init.d named file. You set up such symbolic links to configure servers to start automatically at boot time....

Configuring the xinetd Server to Disable Services

In addition to the stand-alone servers such as a Web server httpd , mail server sendmail , and domain name server named , you have to configure another server separately. That other server, xinetd the Internet superserver , starts a host of other Internet services, such as TELNET, POP3, and so on whenever a client makes a request over the network. The xinetd server includes some security features that you can use to disable the services that it can start on demand. The xinetd server reads a...

Services Started by xinetd

Many Internet services such as Telnet and POP3 are started by the xinetd server. The decision to turn on some of these services depends on factors such as how the system is connected to the Internet and how the system is being used. You can usually turn off most xinetd services. Check which xinetd services are turned on in one of the following ways Check the configuration files in the etc xinetd.d directory for all the services that xinetd can start. If a service is turned off, the...

Exporting a File System with NFS

Start with the server system that exports makes available to the client systems the contents of a directory. On the server, you must run the NFS service and also designate one or more file systems that are to be exported. To export a file system, you have to add an appropriate entry to the etc exports file. For example, suppose that you want to export the home directory and you want to enable the host named LNBP75 to mount this file system for read and write operations. You can do this by...

Enabling Ataatapimfmrll Support

This set of questions involves IDE devices, such as hard disks and ATAPI CD-ROM drives. ATA ATAPI MFM RLL support (IDE) Y n m Enhanced IDE MFM RLL disk cdrom tape floppy support (BLK_DEV_IDE) Y n m This set of questions has four acronyms ATA, IDE, MFM, and RLL. All of these relate to hard disks or interface of disk drives to the PC. Here's what they mean ATA stands for Advanced Technology Attachment and refers to the PC-AT style interface used to connect hard disks and CD-ROM drives to the PC's...

Creating Swap Space

Swap space is a disk partition Linux uses as an extension of its memory. When some memory-resident data is not needed immediately, Linux stores that data in the swap space. To create the swap space, you have to create a disk partition using fdisk. Make sure that you set the type of that disk partition to Linux swap (partition ID 82 in hexadecimal). Typically, you set up the swap partition and turn on swapping as you install Linux from this book's DVD-ROM. If you have to set up the swap space...

Using IP Masquerading to Share an Internet Connection

Linux supports a feature called IP masquerading that enables you to connect an Ethernet LAN with a private IP address to the Internet. This occurs through a Linux PC (with an officially assigned IP address) that has a connection to the Internet as well as a connection to a LAN (for example, your home network). The Linux PC may be connected to the Internet by dial-up PPP or by a high-speed connection, such as DSL or cable modem. With IP masquerading enabled, your Linux PC acts as a stand-in for...

Preparing the Mailer Table

The mailer table database specifies how to route email messages destined for specific domains. You specify these mail routings in a text file etc mail mailertable. For example, suppose all mail meant for mydomain.net should be sent to the host mail host.mydomain.net. You can specify this with the following entry in etc mail mailertable The left-hand side of each line is a domain name. The right-hand side is of the form mailer host, where mailer is a mail transfer agent and host is the host name...

Configuring CHAP and PAP Authentication

The pppd on your system has to authenticate itself to the ISP's PPP server before the PPP connection is up and running. Authentication requires proving that you have a valid account with the ISP and essentially involves providing a user name and a secret (password). PPP specifies two ways of exchanging the authentication information between the two ends of the connection CHAP Challenge Handshake Authentication Protocol (CHAP) requires the remote end to send a randomly generated challenge string...

Installing the New Kernel and Setting Up GRUB

Fedora Linux uses GRUB to load the Linux kernel from the disk. The configuration file etc grub.conf lists the kernel binary that GRUB runs. You can examine the contents of the GRUB configuration file by typing the following command Here is what I see when I try this command on one of my systems grub.conf generated by anaconda Note that you do not have to rerun grub after making changes to this file NOTICE You have a boot partition. This means that all kernel and initrd paths are relative to...

Supported Ethernet Cards

To set up an Ethernet LAN, you need an Ethernet card for each PC. Linux supports a wide variety of Ethernet cards for the PC. Table D-1 lists the supported Ethernet cards and their Linux drivers. The table includes wireless Ethernet cards as well as PCMCIA Ethernet cards. The driver name is useful when you load the Ethernet driver module log in as root and type modprobe drivername to load a driver module . Table D-1 Ethernet Cards and Their Linux Drivers 3Com 3C359 Tokenlink Velocity XL PCI...

What Is Linux

Linux is a freely available UNIX-like operating system that runs on a wide variety of systems. Linus Torvalds and other programmers originally developed Linux for the Intel 80x86 processor. Nowadays, Linux is also available for systems based on other processors, such as those with AMD's 64-bit AMD64 processors, the Motorola 68000 family Alpha AXPs Sun SPARCs and UltraSPARCs Hewlett-Packard's HP PA-RISC the PowerPC and PowerPC64 processors and the MIPS R4x00 and R5x00. More recently, IBM has...

Learning the KDE Display Manager

If you install only the KDE desktop or define the DISPLAYMANAGER variable in the etc sysconfig desktop file as KDE, the kdm program starts the X server for the local display and displays the graphical login window through which you log in to the system. Figure 9-3 shows the graphical login screen that you see when you run the kdm display manager. (To change to the KDE display manager, just add the line DISPLAY-MANAGER KDE to the etc sysconfig desktop file.) Figure 9-3 Graphical Login Screen...

Ethernet Cables

The original Ethernet standard used a thick coaxial cable, nearly half an inch in diameter. That wiring is called thickwire or thick Ethernet, although the IEEE 802.3 standard calls it 10Base5. That designation means several things The data-transmission rate is 10 megabits per second (10 Mbps) the transmission is baseband (which simply means that the cable's signal-carrying capacity is devoted to transmitting Ethernet packets only) and the total length of the cable can be no more than 500...

Using Open Secure Shell for Remote Logins

Linux comes with the Open Secure Shell (OpenSSH) software, a suite of programs that provides a secure replacement for the Berkeley r commands rlogin (remote login), rsh (remote shell), and rcp (remote copy). OpenSSH uses public-key cryptography to authenticate users and to encrypt the communication between two hosts, so users can securely log in from remote systems and copy files securely. In this section, I briefly describe how to use the OpenSSH software in Linux. To learn more about OpenSSH...

Description

DEVICE The device name for the PPP interface (ppp0 for the first interface, ppp1 for LINESPEED Causes pppd to set the modem's data rate (often called the baud rate) to the specified number of bits per second. This is not the same as the data-transfer rate between the local and the remote modem this simply sets the highest data rate for the UART. (See Appendix E for a discussion of UART.) MODEMNAME Identifies the section in etc wvdial.conf file that defines the characteristics of the modem (for...

Setting Up a PPP Server

The preceding sections describe how your Linux PC can establish a PPP link with another system that offers PPP service. After a PPP link is set up, both ends of the PPP link behave as peers. Before a PPP link is established, you can think of the end that initiates the dial-up connection as the client because that system asks for the connection. The other end provides the PPP connection when needed, so it's the PPP server. If you want to enable other people to connect to your Linux PC by using...

Troubleshooting Sound Cards

If, after you configure the sound driver, the sound card does not produce sound when you play a sound file or an audio CD, try the following steps to diagnose and fix the problem 1. Check to see whether or not the sound driver has been loaded. One way to 1. Check to see whether or not the sound driver has been loaded. One way to check is to look at the output of the lsmod command. The following The listing should show some modules whose names begin with snd. If you don't see the sound drivers,...

Filtering Spam with Spam Assassin

Spam unwanted email can be a nuisance, especially if you get too many of these unwanted messages. They fill up your mailbox and take time to sort through. Instead of manually dealing with spam, you can use an automated tool called SpamAssassin written in Perl to automatically identify potential spam based on a number of rules. SpamAssassin examines the header and content of each email message and assigns a You can set up SpamAssassin to filter mail for an entire mail server as well as using it...

Table 2012 Some Kernel Parameters in the procsys Directory

Fs.file-max Maximum number of file handles the Linux kernel can allocate. fs.file-nr Three values representing the number of allocated file handles, the number of used file handles, and the maximum number of file handles. kernel.acct Three values specifying high, low, and frequency that control the logging of process accounting information. When free space on the file system goes below the low (percent), accounting is suspended it resumes when free space goes above high (percent), and frequency...

Deciding How to Connect to the Internet

Nowadays, you have the following popular options for connecting a small office or home office to the Internet (of course, huge corporations and governments have many other ways to connect to the Internet) Digital subscriber line (DSL) Your local telephone company as well as other telecommunications companies offer DSL a high-speed data transmission service over a regular phone line. You can use DSL to connect your Linux system to the Internet. In this case, you must connect a special DSL modem...

Configuring the Sound Card

Linux needs a driver to control the sound card. The Linux kernel should automatically load the correct sound driver after you install Linux from the companion DVD-ROM. The sound drivers are provided as loadable modules that you can also manually load or unload. You will find the sound drivers organized into several directories in the lib modules 2.6.* kernel sound directory. For example, the pci directory has driver modules for PCI sound cards. If you look at the names of the module files, you...

Mounting a DOSWindows File System

If you have Microsoft Windows 95 98 Me installed on your hard disk, you've probably already mounted the DOS partition under Linux. If not, you can easily mount DOS partitions in Linux. Mounting makes the DOS directory hierarchy appear as part of the Linux file system. To identify the DOS partitions easily, you may want to mount the first DOS partition as dosc, the second one as dosd, and so on. To determine whether your DOS hard disk partitions are set up to mount automatically, type the...

Mounting DOS Floppy Disks

Just as you mount a DOS hard disk partition on the Linux file system, you can also mount a DOS floppy disk. You must log in as root to mount a floppy, but you can follow the steps shown in the latter part of this section to set up your system so that any user can mount a DOS floppy disk. You also need to know the device name for the floppy drive. By default, Linux defines the following two generic floppy device names dev fd0 is the A drive (the first floppy drive). dev fd1 is the B drive (the...

Using mtools

One way to access the MS-DOS file system is to mount the DOS hard disk or floppy disk by using the mount command and then use regular Linux commands, such as ls and cp, to work with the mounted DOS file system. This approach of mounting a DOS file system is fine for hard disks. Linux can mount the DOS partition automatically at startup, and you can access the DOS directories on the hard disk at any time. If you want a quick directory listing of a DOS floppy disk, however, mounting can soon...

Learning the mtools Commands

The mtools package is a collection of utilities. So far, I have been using mdir the mtools counterpart of the DIR command in DOS. The other mtools commands are fairly easy to use. insider If you know the MS-DOS commands, using the mtools commands is very easy. Type insight the DOS command in lowercase letters, and remember to add m in front of each command. Because the Linux commands and filenames are case sensitive, you must use all lowercase letters as you type mtools commands. Table 12-3...

Formatting a DOS Floppy

Suppose that you run Linux on your home PC and MS-DOS is no longer on your system, but you need to copy some files onto an MS-DOS floppy disk and take the disk to your office. If you already have a formatted MS-DOS floppy, you can simply mount that floppy and copy the file to the floppy by using the Linux cp command. But what if you don't have a formatted DOS floppy The mtools package again comes to the rescue. The mtools package provides the mformat utility, which can format a floppy disk for...

Floppy Disks in Linux

Chapter 12 describes several ways to access MS-DOS floppy disks under Linux you can mount the floppy and use Linux commands, or use the mtools utility programs to read from or write to the floppy. You also can create a Linux file system on a floppy disk. In fact, you'll find Linux file systems on the boot and root floppies that you use to install Linux. Formatting and creating a Linux file system on a floppy is a straightforward process. To format a 3.5-inch high-density floppy in the A drive,...

Printing the CUPS

On a multitasking and multiuser system such as Linux, a better way to print is to spool the data and schedule the printing send the output to a file, and have a separate process send the output to the printer. That way, you can continue with your work while the printing takes place in the background. In addition, if your system has more than one user, everyone can print on the same printer, without worrying about whether or not the printer is available the background printing process can take...

Understanding the CUPS Configuration Files

You can learn a lot about the CUPS configuration files by examining the entries in various configuration files that the printer configuration tool creates when you set up a new print queue. The CUPS configuration files are in the etc cups directory. Consider the example of adding a new print queue named Office-ES640 for an Epson Stylus Color 640 printer that is connected to the parallel port of the PC. Here are the files that contain information about this print queue and the printer model etc...

Understanding the Fatal Signal 11 Error

Some people get a fatal signal 11 error during installation. This usually happens past the initial boot screen as the anaconda installer is starting its GUI or text interface. The most likely cause of a signal 11 error during installation is a hardware error related to memory or the cache associated with the CPU (microprocessor). Signal 11, also known as SIGSEGV (short for Segment Violation Signal), can occur in other Linux applications. A segment violation occurs when a process tries to access...

Configuring XOrg X11 Using systemconfigdisplay

Fedora Core includes a GUI utility called system-config-display, written in the Python programming language, that enables you to configure X. The system-config-display utility provides a convenient way to configure X through a GUI that itself uses X. To run it, type system-config-display at a shell prompt or, if you are already on the GNOME desktop, select Desktop O System Settings O Display from GNOME's top panel. The utility probes the monitor and video card. Then it starts X (if X is not...

Configuring and Starting the INN Server

So far, you have seen how to read news from an existing news server. Now, you can turn to the subject of setting up an INN server on your system. Much of the InterNetNews (INN) software, bundled with Linux, is already set up for you. You need to understand the various components of INN, edit the configuration files, and start innd the INN server. Sometimes I refer to the INN server as the news server. If you want to support a selection of Internet newsgroups, you also have to arrange for a news...

Proprietary Cdrom Drives

Although the ATAPI and SCSI CD DVD drives fall into neat categories and work well in Linux, the situation is much more confusing when it comes to older CD-ROM drives with a proprietary interface. Following are two of the biggest sources of confusion Some vendors, such as Creative Labs (of SoundBlaster fame), have sold CD-ROM drives with all types of interfaces ATAPI, SCSI, and proprietary interfaces on a sound card. Thus, the vendor's name alone does not mean anything you have to know what type...

Interpreting Directory Listings and Permissions

As you move around the Linux directories, you may want to check the contents of a directory. You can get a directory listing by using the Is command. By default, the Is command without any options displays the contents of the current directory in a compact, multicolumn format. For example, type the following commands to see the contents of the etc X11 directory. (Type the commands shown in boldface I have omitted the command prompts from the listing) X.rpmsave Xmodmap Xresources gdm...

The Video Card

X.Org X11 already provides an X server that loads an appropriate video driver designed to work with a particular video chipset the integrated circuit chips that generate the signals needed to control the monitor . To select the correct video driver, you have to indicate the video chipset your video card uses. Even within a family of video cards based on a specific chipset, many configurable parameters may vary from one card to another. Therefore, you also must specify the vendor name and the...

Rebuilding the Kernel

Rebuilding the kernel refers to creating a new binary file for the core Linux operating system. This binary file is the one that runs when Linux boots. You may have to rebuild the kernel for various reasons After you initially install Linux, you may want to create a new kernel that includes support for only the hardware installed on your system. In particular, if you have a SCSI adapter, you may want to create a kernel that links in the SCSI driver. The kernel in the companion DVD includes the...

Using the chkconfig Command to Disable Services

To provide Internet services such as Web, mail, and FTP, your Linux system has to run server programs that listen to incoming TCP IP network requests. Some of these servers are started when your system boots, and they run all the time. We call such servers standalone servers. The Web server and mail server are examples of standalone servers. The other servers are started on demand by another server called xinetd. You can turn both standalone servers and the ones started by xinetd on or off...

Understanding FTP

As the name implies, the File Transfer Protocol (FTP) enables users to transfer files between systems on the Internet. FTP is client server software you can use the FTP client on a system to access files on another Internet host. The FTP server on that host acts on commands you send via the FTP client. The FTP clients and servers exchange information by using FTP, described in RFC 959, File Transfer Protocol, by J. Postel and J. K. Reynolds, October 1985. FTP uses two TCP ports data is...

Starting and Testing the Caching Name Server

Now that you have studied the configuration files for the caching name server, you can start the name server and see it in operation. To start the name server, log in as root and type the following command at the shell prompt service named start This starts named the name server daemon. To ensure that the server starts every time you reboot the system, log in as root and type the following command The named server writes diagnostic log messages in the var log messages file. After you start...

Understanding the Linux File System

Like any other operating system, Linux organizes information in files and directories. The files, in turn, are contained in directories. A directory can contain other directories, giving rise to a hierarchical structure. This hierarchical organization of files is called the file system. The Linux file system provides a unified model of all storage in the system. The file system has a single root directory, indicated by a forward slash ( ). Then there is a hierarchy of files and directories....

Setting Up Multiport Serial Boards in Linux

If you plan to support a small business with a Linux PC and dumb terminals (terminals are cheaper than complete PCs, although you can also use old PCs as terminals), you want more than two serial ports. With another serial board, the PC can support four serial ports. If you want more than four serial ports, you have to buy special serial I O boards known as multiport serial boards. These boards typically support anywhere from 4 to 32 serial ports. The serial ports share one IRQ, but each port...

Connecting to a Remote Network Using PPP

To set up a PPP networking connection between two systems, you must have PPP software running at both ends. Typically, your ISP provides you with an account already set up, so that the PPP software runs automatically upon login. In that case, simply start the PPP software on your system after you log in to the remote system. In some cases, the ISP might use another authentication protocol PAP or CHAP. Those require some additional configuration on your Linux system. The pppd program takes care...

Specifying Print Options

You can use the -o option with the lp and lpr commands to specify print job options such as paper size, whether to print in landscape orientation, and whether to print a banner page at the start and the end of a print job. For example, suppose that you want to print a file on A4-size paper instead of U.S. letter-size paper that happens to be the default. You can specify this in the print command, as follows That part -o media A4 specifies the value of the standard option named media that can...

Improved Device Handling

Linux 2.6 has a number of new features for handling devices especially hot plug devices such as the ones that connect to USB and Firewire interfaces common in today's PCs. First, the kernel uses a new virtual file system called sysfs that is meant to hold information about the devices on the system. The sysfs file system mounts on sys and it presents a hierarchical view of all the devices organized by device type, bus, and so on. Through sysfs, the 2.6 kernel makes available to other...

Scheduling Recurring Jobs

Although at is good for running commands at a specific time, it's not useful for running a program automatically at repeated intervals. You have to use crontab to schedule such recurring jobs, also called cron jobs because they are processed by the cron daemon (crond). You need to do this, for example, if you want to back up your files to tape at midnight every day. Two files control who can schedule cron jobs using crontab etc cron.allow contains the names of the users who may submit jobs...

Getting Star Office

StarOffice is another commercial office applications suite it was created by StarDivision of Hamburg, Germany, and purchased by Sun Microsystems in 1999. StarOffice is a cross-platform solution it runs on Linux, Windows 95 98 Me NT 2000 XP, Sun Solaris SPARC, and Sun Solaris x86. Also, StarOffice is available in several languages English, French, German, Spanish, Italian, and Swedish. StarOffice is a full-featured office productivity suite. Here's what StarOffice 7 Office Suite includes...

Looking up Online Documentation

You should familiarize yourself with an important source of information in Linux. Every so often, you see instructions that ask you to enter a Linux command. Once you've been working with Linux for a while, it's entirely possible that you'll remember a command's name but forget the exact syntax of what you're supposed to type. For such situations, the Linux online manual pages can come to your rescue. insider To try out the commands described in this section, you have to open a terminal...

Checking Network Status

To check the status of the network, use the netstat command. This command displays the status of network connections of various types (such as TCP and UDP connections). You can view the status of the interfaces quickly with the -i option, as follows Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 11824 0 0 0 12026 0 0 0 BMRU lo 16436 0 2150 0 0 0 2150 0 0 0 LRU In this case, the output shows the current status of the loopback and Ethernet interfaces. Table...

Switching from GNOME to KDE

GNOME and KDE are both capable GUI environments. Fedora comes with both of these GUIs, but you get GNOME as the default GUI. However, Fedora also includes the utility script usr bin switchdesk, which enables you easily to switch from one GUI to another, and vice versa. To switch from GNOME to KDE, type switchdesk kde in a terminal window. When you log out and log back in, you should get the KDE GUI by default. The switchdesk utility runs the switchdesk-helper utility, which in turn changes the...

Using the forward File

Users can redirect their own mail by placing a .forward file in their home directory. The .forward file is a plaintext file with a comma-separated list of mail addresses. Any mail sent to the user is then forwarded to these addresses. If the .forward file contains a single address, all email for that user is redirected to that single email address. For example, suppose that the following .forward file is placed in the home directory of a user named All email addressed to emily is automatically...

Insider Fedora shows the Main Menu button as a red hat icon In a normal KDE installation insight the leftmost button is

Next to the red hat button (Main Menu), the panel includes several other buttons. If you don't know what a button does, simply move the mouse over the button, and a small popup window displays a brief message about that button. KDE supports a virtual desktop. By default, you get four virtual desktops. You can click one of the buttons on the panel (see Figure 9-8) labeled 1, 2, 3, and 4 to switch to a specific desktop. Use the desktops to organize your application windows. You needn't clutter up...

Summary

Linux comes with many applications and utilities. This chapter describes some of these applications, including common office tools spreadsheet, calendars, calculators, and email programs as well as graphics and imaging programs, such as the GIMP and KGhostview. By reading this chapter, you learned the following The companion DVD-ROM includes a variety of applications and utilities. Many of these applications are installed when you install Linux from the companion DVD-ROM, following the steps...

Dynamically Loading a Shared Library

ELF makes it simple to load a shared library in your program and to use the functions within the shared library. The header file < dlfcn.h> declares the functions for loading and using a shared library. Four functions are declared in the file dlfcn.h for dynamic loading void *dlopen(const char *filename, int flag) Loads the shared library specified by filename and returns a handle for the library. The flag can be RTD_LAZY (resolve undefined symbols as the library's code is executed) or...

Serial Line Internet Protocol

SLIP originated as a simple protocol for framing an IP packet an Internet Protocol packet that consists of an IP header (which includes the source and destination IP addresses), followed by data (the data sent from source to destination). In RFC 1055, A Nonstandard for Transmission of IP Datagrams over Serial Lines SLIP, (June 1988), J. L. Romkey describes SLIP. As the title of RFC 1055 suggests, SLIP is not an official Internet standard it's a de facto standard. SLIP defines two special...

Manually Starting and Stopping Servers

The Linux initscripts reside in the etc rc.d init.d directory. You can manually invoke scripts in this directory to start, stop, or restart specific processes usually servers. For example, to stop the Apache Web server (the program's name is httpd), type the following command The etc init.d file is defined as a symbolic link to etc rc.d init.d. Therefore, you can also execute the previous command as follows If httpd is already running and you want to restart it, all you have to do is change the...

Understanding How init Starts the Display Manager

A process named init starts the initial set of processes on your Linux system. What init starts depends on the current run level, the contents of the etc inittab file, and the shell scripts located in the etc rc.d directory and its subdirectories. For now, you don't need to understand the details you must know, however, that the graphical login screen starts at run level 5. cross Chapter 20 describes in detail the init process, the etc inittab file, and the Linux ref boot process. The last line...

SELinux Configuration

In Fedora Linux, SELinux configuration information is stored in a text file etc selinux config. The config file controls what policy SELinux uses and how it enforces the policy. Here is the complete listing of the config file from a Fedora system This file controls the state of SELinux on the system. SELINUX can take one of these three values enforcing - SELinux security policy is enforced. permissive - SELinux prints warnings instead of enforcing. disabled - SELinux is fully disabled. SELINUX...

Cable and Termination Problems

The SCSI bus needs terminators at both ends to work reliably. A terminator is a set of resistors that indicate the end of the SCSI bus. One end is the controller card itself, which typically has the terminator on it. Often, a SCSI device has two SCSI connectors, so that you can daisy-chain several external SCSI devices. You are supposed to place a terminator on the last connector on the chain. insider Some SCSI controllers such as Adaptec AHA 154xC, 154xCF, and 274x (x is any insight digit) are...

Using Supported PC Cards

In the PCMCIA Card Services documentation directory, you'll find a file named SUPPORTED. CARDS. You can change to that directory by typing cd usr share doc pcmcia . That file lists some of the PCMCIA Cards that are known to work with at least one system. The same list is available online at .CARDS. You can also read about the various types of supported cards at www.pcmcia .org faq.htm devices. The list of supported cards has become too numerous to include here. Some of the common categories of...

Exploring the proc File System

You can find out a great deal about your Linux system by consulting the contents of a special file system known as proc. Knowing about the proc file system is useful because it can help you monitor a wide variety of information about your system. In fact, you can even change kernel parameters through the proc file system and thereby modify the system's behavior. The proc file system is not a real directory on the disk but a collection of data structures in memory, managed by the Linux kernel,...

Learning the sendmail Configuration File

You don't need to understand everything in the sendmail configuration file, etc mail sendmail.cf, but you should know how that file is created. That way, you can make minor changes if necessary and regenerate the etc mail sendmail.cf file. To be able to regenerate the sendmail.cf file, you have to install the sendmail-cf package. To check whether the sendmail-cf package is installed, type rpm -q sendmail-cf. If the command does not print the name of the sendmail-cf package, you have to install...

POSIX Compliance

Linux is designed to comply with IEEE Std 1003.1 1996 Edition (POSIX). This standard defines the functions that applications written in the C programming language use to access the services of the operating system for tasks ranging from opening a file to allocating memory. On March 8, 1996, the Computer Systems Laboratory of the National Institute of Standards and Technology (NIST), a U.S. government agency, confirmed that Linux version 1.2.13, as packaged by Open Linux Ltd., conforms to the...

Configuring Networks at Boot Time

You want to start your network automatically every time you boot the system. For this to happen, you have to put the appropriate commands in one or more startup scripts. The init process runs immediately after Linux boots. The process consults the etc inittab file and executes various commands (typically, shell scripts), depending on the current run level. For example, in run level 3 the multiuser level etc inittab specifies that init should run the script file etc rc.d rc with the argument 3....

Setting Default File Permissions

What permission setting does a file get when you (or a program) create a new file The answer is in what is known as the user file-creation mask that you can see and set using the umask command. Type umask, and it prints out a number showing the current file-creation mask. The default setting is different for the root user and other normal users. For the root user the mask is set to 022 whereas the mask for normal users is 002. To see the effect of this file-creation mask and to interpret the...

Using execshield

Buffer overflow is a major cause of many Linux security holes. When buffer overflow occurs, a cracker can overwrite data-storage areas of memory with instructions designed to execute nasty commands. The latest Linux kernel comes with a kernel setting exec-shield that enables you to stop the kernel from executing instructions from any data area. This protects against the common buffer overflow type of vulnerabilities by making many parts of a program's memory (including the stack where temporary...

Using the Nautilus Shell

Now that you know the basics of the Linux file system, you can explore it. You can access the files and directories in two ways By using a graphical file manager such as the Nautilus shell in GNOME By typing appropriate Linux commands in a terminal window or a text console The Nautilus graphical shell is intuitive to use it is similar to Windows' Active Desktop and you can perform many tasks such as navigating the file system and performing systemmanagement tasks with Nautilus. You may want to...

Plotting Data with Gnuplot

How Reference Chart Paper

Gnuplot is an interactive plotting utility. You need to run Gnuplot under the X Window System because it uses an X window as the output device. Gnuplot is a command-line-driven program it prompts you and accepts your input commands. In response to those commands, Gnuplot displays various types of plots. The output appears in an X window. To install Gnuplot, log in as root, mount the DVD-ROM, and type the following commands in a terminal window change media cdrom to media cdrecorder if you are...

Linux Desktop

Let's face it typing cryptic UNIX commands on a terminal is boring. Those of us who know the commands by heart may not realize it, but the installed base of UNIX is not going to increase significantly if we don't make the system easy to use. This is where the X Window System, or X, comes to the rescue. X provides a standard mechanism for displaying device-independent, bitmapped graphics. In other words, an X application can display its graphic output on many different machines that use...

Steps to Follow

You have three high-level steps to complete 1. Download and install the BitTorrent client software on your system. 2. Adjust your system's firewall settings to open up TCP ports 6881 through 6999 that are used by BitTorrent to send files to others. 3. Run the BitTorrent client to start the file transfers. I describe these three high-level steps in detail in the following sections. Download and Install the BitTorrent Client Make sure your system's Internet connection is up. Then follow these...

Linux Standard Base

Linux has become important enough that there is now a standard for Linux called the Linux Standard Base, or LSB for short. LSB is a set of binary standards that should help reduce variations among the Linux distributions and promote portability of applications. The idea behind LSB is to provide application binary interface (ABI) so that software applications can run on any Linux (or other UNIX) systems that conform to the LSB standard. The LSB specification references the POSIX standards as...

Managing Groups

A group is something to which users belong. A group has a name and an identification number (GID). After a group is defined, users can belong to one or more of these groups. You'll find all the existing groups listed in etc group. For example, here is the line that defines the group named wheel As this example shows, each line in etc group has the following format with four fields separated by colons groupname password GID membership Table 12-2 explains the meaning of the four fields in a group...

Viewing Process Information

Every time the shell acts on a command that you type, it starts a process. The shell itself is a process so are any scripts or programs that the shell executes. Examples of such programs are the Metacity window manager and Nautilus graphical shell in GNOME. You can use the ps command to see a list of processes. When you type ps ax, for example, Bash shows you the current set of processes. Following is a typical report displayed when you enter the ps ax command in a terminal window. (I also...

Testing the PPP Connection

If you have PPP access to another system (such as an ISP or a system at your employer's organization), you can set up a script as described in the preceding section and enjoy the benefits of full TCP IP network access to another system. After you run the script, and after pppd completes the initial protocol exchanges to set up the connection, you can verify that the connection is up by typing the ifconfig command. You should see the ppp0 device listed in the output. The ifconfig output also...

Understanding the Mail Delivery Mechanism

On an Internet host, the sendmail mail-transport agent delivers mail using the Simple Mail Transfer Protocol SMTP . SMTP is documented in RFC 821, Simple Mail Transfer Protocol, by Jonathan Postel, 1982. SMTP-based mail-transport agents listen to the TCP port 25 and use a small set of text commands to interact with other mail-transport agents. In fact, the commands are simple enough that you can use them directly to send a mail message. The following example shows how I use SMTP commands to...

Configuring Samba

To set up the Windows file-sharing and print-sharing services, you have to provide a configuration file named etc samba smb.conf. The configuration file is a text file that looks like a Microsoft Windows 3.1 INI file. You can prepare the file in any text editor on your Linux system. Like the old Windows INI files, the etc samba smb.conf file consists of sections, with a list of parameters in each section. Each section of the smb.conf file begins with the name of the section in brackets. The...

Setting the NIS Domain Name

The NIS domain name identifies the group of computers that a particular NIS server supports. You can set the NIS domain name of your system by using the domainname command. For example, to set your NIS domain name to admin, log in as root, and type the following at the shell prompt If you type domainname without any arguments, the command prints the current NIS domain name. To ensure that the NIS domain name is set as soon as your system boots, the command should be run from one of the startup...