The virtual mail server receives mail for a domain that doesn’t have a real machine.. Alternatively, virtual mail server can be set up to receive mail addressed to anything@mydomain.com,
Trang 1The results of the test should appear as follows:
jo Connecting to local
jo Sent
The -vtells sendmailthat you want to use it in verbose mode, which means it prints everything it does The account the mail was sent to is jo, and the letteris what you created Now joshould have some mail if everything worked Log in as jo
to get the mail You can also include all the To:, From:, and Subject: information usually found in messages.
Normally, sendmailis used through some type of client Some situations may call for sending mail through the command line, in which case the previous command will work Some examples of situations in which you might want to use sendmailfrom the command line include during, after, or as a result of an automated task In this way, sendmailcan notify administrators of problems or the completion of tasks, or it can broadcast an e-mail message.
General Mail Considerations
Now that you have a mail server installed on your system, you need to understand
a few topics that tend to affect more than one specific mail system As such, they are covered in the following sections under different categories
E-mail aliases
Most e-mail servers make use of an alias file Because it is not recommended that certain accounts log in to a console such as root, daemon, and several others, mail sent to these accounts can be rerouted to another account that does log in on a reg- ular basis Mail sent to these system accounts, usually error messages, typically get aliased to the root account Then the root account can be aliased to the administra- tor of the system This just means that when the server goes to send mail to one of these accounts, it will be redirected to whomever needs to see the mail The alias information is kept in /etc/aliases(or alternately /etc/mail/aliases, depend- ing on your choice of mail server), which can be edited so that the correct people receive the mail notices
You can also add virtual accounts in this file A virtual account is not a real account, but a name by which users can receive e-mail For instance, “webmaster” may not
be an account set up for log in, but the person who manages the Web pages may want to use that ID for e-mail In cases where several people may rotate through a position, it’s easier to change a name in a file to redirect mail, than to change an e-mail address on hundreds of Web pages
Trang 2After all changes have been made to the aliases file, a database must be created for the mail server to read This is done easily with the newaliasescommand You must be in the directory of the aliases file, and then issue the command If all the alias names and formats are correct, a database will be created; otherwise, you may receive error statements that necessitate correcting the file.
Forwarding your mail
Today, many people have more than one e-mail account through the Internet To avoid confusion, all the mail from one system’s e-mail address can be redirected to
an account on another system This is known as forwarding Forwarding e-mail is
very useful
You may work in an environment with several servers running These servers can
be set up to automatically generate a report, which can be e-mailed to the trator of the mail server The administrative account can then forward the mail to a central location, where the administrator can read the report This enables the administrator to avoid logging on to each server to read the e-mail.
adminis-Similarly, an individual user can forward mail from one e-mail address to another,
be it on the same machine or to another system Suppose that an individual is expecting an important e-mail message, but is going to be away on vacation With one of the many available free Internet e-mail accounts, which can be accessed any- where, he or she can temporarily forward any messages.
As with most text-based Internet tools, e-mail is also subject to security risks
Sending and receiving e-mail is not at all secure There are some methods, ever, that can help to increase the security of e-mail messages, such as encryptingthe message and using encryption keys See Chapter 19 for more information onsecurity
how-To forward your mail to another address, you must create a file in the home account location Create the ~/.forwardfile and add a line with the e-mail address
to which you would like the mail forwarded For instance, if my e-mail address werejo@domain.comand I wanted to have my e-mail forwarded to jo@mydomain.com, I would do the following:
$ vi ~/.forward
In the file, I would add jo@mydomain.com, and then save and exit the editor Now, whenever mail is sent to jo@domain.com, it will be forwarded to jo@mydomain.cominstead If you wish to cancel the forwarding, you can simply delete the ~/.forwardfile.
Caution
Trang 3Virtual mail server
Virtual mail server is not a function that most individuals would want to use; however, for businesses that host Web pages, process e-mail, and provide other Internet-related services, it is an important one
The virtual mail server receives mail for a domain that doesn’t have a real machine One method of working around this is to use the relay functions with the mail servers This enables mail to be received on a mail server without the machine hav- ing the same domain name The drawback to this method is that each address must have a unique name Two domains with the same account ID will end up with mail going to the one account; for instance, jo@domain.comand jo@example.comwill
be treated as the same address.
Alternatively, virtual mail server can be set up to receive mail addressed to
anything@mydomain.com,which is routed to only one account For instance, pose mail sent to sale@mydomain.comand mail sent to debianrules@mydomain comis routed to the account joon the mail.domain.commachine This way, Jo can pick up her mail whenever she wants In other words, she can have mail sent to any name as long as it ends in @mydomain.com
sup-In order to set up sendmailto route mail sent to anything for a domain, you must add a line to the /etc/mail/sendmail.cffile Always make a back up copy of the configuration file before making any changes Use an editor and locate section 98 (S98) If you are using vias your editor, use the search command to find this sec- tion (/S98) After this section identifier, add a line that looks like the following:
R$* < $* domain.com > $#local $@ $:username
Replace domain.comwith the name of the domain that will be virtually hosted There must be a TAB between the two halves of the command After R$* < $*domain.com >, enter a TAB and then finish the line Replace usernamewith the account name to which the mail will be sent If the TAB does not appear in the line, the virtual hosting will not work
Once you have edited the configuration file, restart the sendmailservice.
Following are the commands to accomplish this:
# /etc/init.d/sendmail stop
# /etc/init.d/sendmail startSendmailwill now be ready to receive mail from the new virtual domains You can test mail sent to the new domains in the same way that you tested to see if sendmailworked initially You should be able to send mail to any name as long as it is addressed to the virtually hosted domain.
Trang 4DNS and Internet mail
On the Internet or within a local network, where a Domain Name Server (DNS) is used to match domain names with actual IP addresses, mail is not handled in the same way The DNS just wants to know the names of the mail exchangers; that is, the identities of the mail servers that can receive mail for a domain or forward it along Each domain’s mail server, or mail exchanger, needs an MX (Mail Exchanger) record created for it It also needs to be registered
If there is more than one mail exchanger for a domain, each MX record is weighted for priority Even on a domain that has only one mail exchanger, that mail
exchanger is still weighted with a priority The number representing the priority can be anything from 0 to 65,535 (that’s a lot of mail servers) Lower numbers are taken to be a higher priority.
For example, assume you have a network with a DNS You have the mail services running on mail.domain.com,with the name of that machine registered in the DNS You want all the mail for the domain domain.comto use mail.domain.com
as the mail exchanger You add an MX record to the DNS that would look like the following:
2 If mail.domain.com is unreachable, disconnected, or busy, then
mail2.domain.comor mail3.domain.comwould be tried next (both have the same priority).
3 The remaining two servers (mail2 and mail3) would be tried last.
This scheme of MX records enables the use of secondary and backup mail servers.
Because the names are registered in the DNS, these servers need not exist on the same network or location on the Internet.
To learn more about the Domain Name Server, see Chapter 5
Cross-Reference
Trang 5Using mailing lists
Mailing list servers, commonly called list servers, automate the use of mailing lists,
including distribution, subscriptions, and mailing requests — all without much human management Computers can work much more efficiently than we can Think of the list server as a dedicated program that monitors a mailbox for new mail It then determines if incoming mail has a command associated with it or if it should be sent back to the subscribers of the list Typically, the commands appear
in the form of subscribe or unsubscribe requests This automatically enables users to
add or remove their e-mail address from a list Other commands might include requests for specific documentation.
Mailing lists are used everywhere as a common e-mail forum in which people to get help, share ideas, or, in some cases, just complain And, yes, some mailing lists merely generate junk mail Some e-mail claims to be from a mailing list when in fact
it is just plain, old-fashioned spam (junk mail) The bottom of these messages gives
a bogus e-mail address for you to unsubscribe, which only bounces back an error that no one exists at that address Legitimate sites always respond to an unsub- scribe request
Debian uses many mailing lists When you visit their Web site (www.debian.org/MailingLists), you will see several mailing lists, all designed to enable people to communicate with one another on a variety of topics There are lists for end users, developers, and specialty groups
Setting Up POP
You were already introduced to the Post Office Protocol (POP) earlier in the ter, but let’s review a few points Because clients that use POP exist on nearly every platform, it has become the most popular protocol for picking up mail The disad- vantages of using POP are that you have to get all your mail at one time and can use only one computer to do so This limits your flexibility and mobility because you can’t read your downloaded mail on another machine Moreover, POP reads only one folder on the mail server Clients compensate for this by creating local folders
chap-in which you can read, sort, and manage your mail.
Installing and configuring POP
To begin, you must install a POP server on the mail server Table 25-1, at the ning of the chapter, lists the two POP servers that Debian provides in package form:ipopdand qpopper By default, Debian installs the ipopdpackage, which works fine; however, qpopperhas some enhanced features added
begin-The packages are easy to install with dselect The configuration stage of the install modifies the inetd.conffile so that the 110 TCP/IP port gets monitored for mail
Trang 6requests This is the official port for POP services The configuration script adds the following line to the /etc/inetd.conffile (in this case, I installed qpopperinstead of ipopd):
pop-3 stream tcp nowait root/usr/sbin/tcpd /usr/sbin/in.qpopper
If you make changes in the inetd.conffile, be sure to restart the inetservice to activate the changes Use the following command string to restart the service:
# /etc/init.d/inetd stop
# /etc/init.d/inetd start
Testing POP
With the POP service installed and running, you can now test the connection.
Because POP uses a TCP/IP port, you can use telnetto connect to that port:
# telnet localhost pop-3Alternately, you can check the port from a remote computer; use the same com- mand, but replace localhostwith the fully qualified domain name You can also specify the port number (110) instead of using the name (pop-3) Here are the results of a connection to a server running qpopperas the POP server:
$ telnet localhost pop-3
+OK Pop server at debian.rhino-tech.com signing off
Connection closed by foreign host
$The bold text in the preceding example shows the commands that you would need
to use I logged in using user jo The account for johad to be created before ing the POP server The server then responded by asking for a confirmation in the form of a password I then entered the password command (pass) and the pass- word Note that the password is not encrypted for this test, so don’t use a critical account to do your testing (lest someone evil is watching in the background).
test-Satisfied that the POP service was working properly, I issued the quitcommand to close the connection The server then notified me that the connection was closed.
Trang 7You can find out more about mail clients and retrieving mail in Chapter 6
Setting Up IMAP
Although POP took off in the early days of computing, IMAP has found its niche as distributed computing has increased IMAP users benefit from the capability to access more than one folder on the server, to mark mail as read or unread, and to leave mail on the server so that it is accessible from multiple machines
Because an IMAP system leaves the mail on the server, the mail is available to you whether you are traveling with a laptop, working at the office with a desktop, or checking in at home with your personal system This is the major advantage to using IMAP
Installation and configuration
IMAP installation and configuration is as easy as they come Using dselectto install the imappackage, the configuration script that is executed at the end makes all the needed changes IMAP also uses the inetdservice to watch the TCP/IP port Here is the line the script adds to the /etc/inetd.conffile:
imap2 stream tcp nowait root/usr/sbin/tcpd /usr/sbin/imapd
You can make changes to this script, but I don’t advise it The script automatically restarts the inetservice; but if you need to restart the service for any reason, implement the following commands:
# /etc/init.d/inetd stop
# /etc/init.d/inetd startWith the software installed and running, the IMAP service is activated anytime a request comes into the IMAP port.
Testing IMAP
Once installed, you’ll want to test the service to make sure that it works This can
be done through a terminal connection to the machine, either locally or remotely Initiate the connection to the IMAP port with the following command line:
telnet localhost imap2This starts a connection to port 143 through TCP/IP, which is the IMAP port on your Debian machine Alternatively, you can connect remotely by replacing localhostwith the name or IP of the remote machine hosting the IMAP service
Cross-Reference
Trang 8# telnet localhost imap2
Trying 127.0.0.1
Connected to localhost
Escape character is ‘^]’
* OK localhost IMAP4rev1 v12.264 server ready
A001 login jo foobar14
A001 OK LOGIN completed
A002 logout
* BYE debian.domain.com IMAP4rev1 server terminating connectionA002 OK LOGOUT completed
Connection closed by foreign host
In the previous example, you can see the response of the IMAP server The bold text shows what I entered The A001 logintold the IMAP server that someone wanted
to log in It then took the next entry as the user ID, followed by the password These must be valid accounts and passwords or the server will respond with a login request Once the server validates the login, it will respond with a confirmation that the login is complete You can then log out of the IMAP server.
Always keep the versions of all your servers up-to-date Security holes are fixedquickly, but it won’t matter if you keep running the old buggy versions of software
See Chapter 19 for more details about security
Getting Help
When you install mail serviceson your system, in most cases it should work Of
course, with no two machines alike, the potential for problems always exists
The following guidelines will help you troubleshoot any problems with mail:
✦ Make sure that you have an MX record in the DNS for each domain receiving mail This entry should point to the machine that runs the mail server.
✦ Make sure that the /etc/mail/sendmail.cwfile is properly configured if you are using sendmail It contains all domains for which this server is responsi- ble for receiving mail
✦ The alias file (/etc/aliasesor /etc/mail/aliases) should contain an entry for the postmaster, the mailer-daemon, or whatever name was set to receive error messages from the mail server This name should be aliased to
an administrator for the system This will help to track down other problems.
A good source for help is always other users, peers, and administrators You can find great advice and helpful hints through Web sites, newsgroups, and mailing lists If you visit www.debian.org/MailLists, you’ll find tons of mailing lists of knowledgeable people to help answer your questions
You might also find useful information at one of the Web sites focused on the ous applications Here are a few sites that might provide answers to your questions:
vari-Caution
Trang 9✦www.exim.org— Site for the eximmail server
✦www.sendmail.org— Site for the Open Source version of Sendmail
✦www.imap.org— Site for the IMAP mail client server
No matter what the problem, it’s likely that someone else has battled with it Be sure to thoroughly explain your problem when posting to a mailing list or news- group, or enlisting online support through a Web site
Summary
This chapter has been fairly comprehensive in covering topics regarding electronic mail You have learned about several mail-related programs, some used for transfer- ring mail, and some used for retrieving mail You’ve also learned about several mail- related concepts:
✦ MTA — A Mail Transfer Agent is a program that routes mail from system to tem These are the programs that actually deliver the mail to its destination.
sys-✦ SMTP — Simple Mail Transfer Protocol is the language the MTA programs use
to communicate in order to transfer the mail These programs don’t have to
be the same program; they just need to be able to speak SMTP.
✦ MUA — A Mail User Agent is a program that retrieves the mail These are client applications, and are covered in Chapter 6.
✦ POP — Post Office Protocol is the protocol that the MUA applications use to retrieve the mail This protocol enables users to get their mail and remove it from the server POP limits users to one machine from which to read their mail
✦ IMAP — Internet Mail Access Protocol enables users to access their mail on the server Users can also leave their mail on the server, thus enabling them to access their mail from different machines and locations This protocol also can mark the mail as read, unread, or deleted It also can access more than one folder on the server, enabling users to manage their mail.
Also covered in this chapter was the installation and configuration of two mail servers The Debian packages include configuration scripts to help configure these packages for most situations You also learned about some common e-mail topics, including forwarding mail, setting up aliases, and virtual hosting e-mail These topics can help you with most SMTP programs that you choose to install You also learned how to install two protocols that are used to retrieve mail from the server: POP and IMAP In addition, you were also introduced to mailing list servers You should now have the basic knowledge needed to set up and run your own mail server Happy mailing.
Trang 10What’s On the CD-ROM
A ppendix A provides you with information on the tents of the CD-ROM that accompanies this book.
con-There are 1,194 programs and supporting packages included
on this CD Among them are:
✦ Gnome Desktop Environment
✦ GIMP graphic design tool
✦ Apache Web Server Although Debian GNU/Linux offers its distribution for many platforms, the media that accompanies this book is only for the i386-based PC platform
Using the CD with Linux
To install Debian GNU/Linux from the CD to your hard drive, follow the steps listed in Chapter 2 of this book These instructions will thoroughly take you through the installation process.
What’s On the CD
The contents of this CD contain the core files for installing Debian GNU/Linux on your system All software on this CD is free to use and free to copy under the GNU General Public License The following summary shows some of the contents
of the CD-ROM arranged by category.
A
A P P E N D I X
Trang 11For more information: www.gnome.org
✦ WindowMaker — A window manager used to control the window
environ-ments for other programs to run in.
For more information: www.windowmaker.org
Development environments
Linux makes a stable environment for developing applications.
✦ Perl — A popular scripting language used on several platforms.
✦ Tc/Tkl — An interpretive language used mainly for graphical interfaces.
✦ g++ — The equivalent to c++ for Linux using the C language.
For more information: www.apache.org
✦ Samba — Allows Windows machines on a network to share files and resources
from the Debian server.
For more information: www.samba.org
In addition to these programs, you will find a complement of other server tions like FTP, News, and Domain Name Services.
applica-Source code
All source code for the programs are available through a mail in coupon found in the back of this book Fill out the information on the coupon and mail it in A CD with the source code will then get mail to you.
Trang 12If you have difficulty installing or using the CD-ROM programs, try the following solutions:
✦ Enable CD booting from the system BIOS — Some systems set the boot
device order Make sure that the CD-ROM device is chosen before the hard drive C If you have an older system, this may not be an option in which case you will need to follow the instructions in Chapter 2 on creating a boot disk.
(Consult your systems manual on accessing the BIOS)
✦ Make sure the Rescue disk is in the floppy drive — When booting the system
using the floppies, the first floppy to use for booting is the rescuedisk You will then get asked for the rootfloppy once the system gets initialized.
If you still have trouble with the CD, please call the Hungry Minds Customer Service phone number: (800) 762-2974 Outside the United States, call (317) 572-3993.
Hungry Minds will provide technical support only for installation and other general quality control items; for technical support on the applications themselves, consult the program’s vendor or author.
Trang 13Linux Commands
T here are programs and commands that are scattered
across the Debian filesystem Appendix B attempts to cover many of the commands found in the common areas on the filesystem This is not a comprehensive list since some of the commands are included in the text of this book.
If you need more information than a general description for any of these applications, then look at the manpage for the specific application Any of these applications that are installed on your system will have the corresponding docu- mentation associated with it You can access the documenta- tion at any time from a virtual terminal by typing:
Linux Commands
Below each command is the syntax for the command The syntax may contain brackets [ ], which indicate that these are optional for the command to perform Any three dots ( ) indi- cate that more than one of those options can be used The pipe (|) indicates that one or the other can be used.
B
A P P E N D I X
Trang 14/bin/cat— Concatenate files and print on the standard output
cat [OPTION] [file]
/bin/cp— Copy files and directories
cp [OPTION] source dest
/bin/date— Print or set the system date and time
date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
/bin/dd— Convert and copy a file Often used when sending a file to floppy
dd [OPTION]
/bin/df— Report on filesystem disk space usage
df [OPTION] [file]
/bin/dir— List directory contents.
dir [OPTION] [file]
/bin/dmesg— Print or control the kernel ring buffer
dmesg [ -c ] [ -n level ] [ -s bufsize ]
/bin/ed— Text editor
Trang 15/bin/more— File perusal filter for terminal viewing
more [OPTION] [file ]
/bin/mount— Mount a file system
mount [OPTION] device
/bin/mt— Control magnetic tape drive operation
mt [-f device] operation [count]
/bin/ping— Send ICMP ECHO_REQUEST packets to network hosts
ping [-c count] [-i wait] [-s packetsize] destination
/bin/ps— Report process status
ps [OPTION]
/bin/rm— Remove files and directories
rm [OPTION] file
/bin/sh— GNU Bourne-Again Shell
bash [OPTIONS] [file]
/bin/su— Becomes super user
su [OPTION] [-] [username [ARGS]]
/bin/tar— The GNU version of the tar archiving utility tar [OPTION] file | directory
/bin/umount— Unmount file systems
umount [OPTION] device
sbin commands
/sbin/activate— Read/write flags marking active boot partition
activate device partition
/sbin/cfdisk— Cursor-based disk partition table manipulator for Linux
cfdisk [ OPTION ] [ device ]
Trang 16/sbin/fdisk— Partition table manipulator for Linux
fdisk [-u] [-b sectorsize] device
sfdisk— Partition table manipulator for Linux
sfdisk [OPTION] device
/sbin/fsck— A file system consistency checker for Linux
fsck [OPTION] [-t fstype] [ ] [fsck-options] filesys [ ]
/sbin/getty— Alternative Linux getty
getty [OPTION] port baud_rate, [term]
/sbin/hwclock— Query and set the hardware clock (RTC)
hwclock OPTION
/sbin/init— Process control initialization
init [ -a ] [ -s ] [ -b ] [ -z xxx ] [ 0123456Ss ]
/sbin/kbdrate— Reset the keyboard repeat rate and delay time
kbdrate [ -s ] [ -r rate ] [ -d delay ]
/sbin/losetup— Set up and control loop devices
losetup [ -d ] loop_device
/sbin/mkfs— Build a Linux file system
mkfs [ -V ] [ -t fstype ] [ fs-options ] filesys [ blocks]
/sbin/mkswap— Set up a Linux swap area
mkswap [-c] [-vN] [-f] [-p PSZ] device [size]
/sbin/sfdisk— Partition table manipulator for Linuxsfdisk [options] device
/sbin/swapoff— Enable/disable devices and files for paging and swapping
swapoff OPTION
Trang 17/sbin/swapon— Enable/disable devices and files for paging and swapping
/usr/bin/Mail— Send and receive mail
mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr
/usr/bin/MakeTeXPK— Create a PK file for a font
mktexpk [OPTION] font [redirect]
/usr/bin/a2p— Awk to Perl translator
a2p [OPTION] filename
/usr/bin/access— Determine whether a file can be accessed
access -mode file
/usr/bin/addftinfo— Add information to troff font files for use with groff
addftinfo [ -param value ] res unitwidth font
/usr/bin/ar— Create, modify, and extract from archives
ar [-]{dmpqrtx}[OPTION] [membername] [count] archive files
/usr/bin/as— The portable GNU assembler
As [OPTIONS]
/usr/bin/at— Queue, examine or delete jobs for later execution
at [-V] [-q queue] [-f file] [-mldbv] TIME
/usr/bin/awk— Pattern scanning and text processing languageawk [-W option] [-F value] [-v var=value] [ ] ‘program text’
[file ]
Trang 18/usr/bin/bc— An arbitrary precision calculator language
bc [ -lwsqv ] [long-options] [ file ]
/usr/bin/cal— Displays a calendar
cal [-jy] [[month] year]
/usr/bin/cc— GNU project C and C++ Compiler
/usr/bin/comm— Compare two sorted files line by line
comm [OPTION] LEFT_FILE RIGHT_FILE
/usr/bin/cut— Remove sections from each line of files
cut [OPTION] [file]
/usr/bin/dc— An arbitrary precision calculator
dc [-V][-h][-e scriptexpression] [-f scriptfile] [file ]
/usr/bin/ddate— Converts Gregorian dates to Discordian dates
ddate [+format] [date]
Trang 19/usr/bin/dig— Send domain name query packets to name servers
dig [@server] domain [OPTIONS] [%comment]
/usr/bin/du— Estimate file space usage
du [OPTION] [file]
/usr/bin/edit— Alias to execute edit function via entries in the mailcap fileedit < opt=val> [ ] [<mime-type>:[<encoding>:]]<file> [ ]
/usr/bin/editor— Text editors
editor [-eFRrSsv] [-c cmd] [-t tag] [-w size] [file ]
/usr/bin/etex— Extended TeX
etex [OPTIONS] [commands]
/usr/bin/ex— Text editors
ex [-eFRrSsv] [-c cmd] [-t tag] [-w size] [file ]
/usr/bin/file— Determine file type
file [ -bcnsvzL ] [ -f namefile ] [ -m magicfiles ] file
/usr/bin/find— Search for files in a directory hierarchy
find [path ] [expression]
/usr/bin/fmt— Simple optimal text formatter
fmt [-DIGITS] [OPTION] [file]
/usr/bin/free— Display amount of free and used memory in the system
free [-b | -k | -m] [-o] [-s delay ] [-t] [-V]
/usr/bin/from— Print names of those who have sent mail
from [-s sender] [-f file] [user]
/usr/bin/getopt— Parse command options (enhanced)
getopt [OPTIONS] [ ] optstring parameter
Trang 20/usr/bin/gettext— GNU gettext utilities
gettext [OPTION] [[[TEXTDOMAIN] MSGID] | [-s [MSGID] ]]
/usr/bin/groff— Front end for the groff document formatting system
groff [ OPTIONS][ files ]
/usr/bin/host— Query nameserver about domain names and zones
host [-v] [-a] [-t querytype] [OPTIONS] name | zone [server]
/usr/bin/icat— “cat” a mailbox from an IMAP source
icat [ OPTIONS ] mailbox
/usr/bin/id— Print real and effective UIDs and GIDs
id [OPTION] [USERNAME]
/usr/bin/info— Read Info documents
info [OPTION] [MENU-ITEM ]
/usr/bin/ipcrm— Provide information on ipc facilities
ipcrm [ shm | msg | sem ] ID
/usr/bin/ipcs— Provide information on ipc facilitiesipcs [ -asmq ] [ -tclup ]
/usr/bin/ld— The GNU linker
ld [-o output] objfile
/usr/bin/locate— List files in databases that match a pattern
locate [-d path][-e ][ version] [ help] pattern
/usr/bin/logger — Make entries in the system log
logger [-is][-f file][-p pri][-t tag][-u socket][message ]
/usr/bin/mag— Computes fontsizes and magsteps
mag [-Rdpi] magstep | fontsize
Trang 21/usr/bin/mail— Send and receive mail
mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr
/usr/bin/mailx— Send and receive mail
mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr
/usr/bin/make— GNU make utility to maintain groups of programs
make [ -f makefile ] [ option ] target
/usr/bin/man— An interface to the on-line reference manuals
man -l [-7] [-tZT device] [-p string] [-P pager] [-r prompt]
/usr/bin/namei— Follow a pathname until a terminal point is found
namei [-mx] pathname [ pathname ]
/usr/bin/nice— Run a program with modified scheduling priority
nice [OPTION] [COMMAND [ARG] ]
/usr/bin/nl— Number lines of files
nl [OPTION] [file]
/usr/bin/nm— List symbols from object files
nm [OPTIONS]
/usr/bin/ns— Query nameserver about domain names and zones
ns [-v] [-a] [-t querytype] [options] name [server]
/usr/bin/od— Dump files in octal and other formats
od [OPTION] [file]
Trang 22/usr/bin/poff— Shuts down the log of PPP connections
/usr/bin/print— Alias to execute print function via entries in the mailcap file
print < opt=val> [ ] [<mime-type>:[<encoding>:]]<file> [ ]
/usr/bin/refer— Preprocess bibliographic references for groff
refer [ OPTIONS ][ filename ]
/usr/bin/renice— Alter priority of running processes
renice priority [[-p] pid ] [[-g] pgrp ] [[-u] user ]
/usr/bin/reset— Terminal initialization
reset [-IQqrs][-][-e ch][-i ch][-k ch][-m mapping][terminal]
/usr/bin/rev— Reverse lines of a file
rev [file]
/usr/bin/script— Make typescript of terminal session
script [-a] [file]
/usr/bin/see— Alias to execute the see function via entries in the mailcap file
see < opt=val> [ ] [<mime-type>:[<encoding>:]]<file> [ ]
/usr/bin/setsid— Run a program in a new session
setsid program [ arg ]
/usr/bin/setterm— Set terminal attributes
setterm [OPTIONS]
Trang 23/usr/bin/sg— Execute command as different group ID
sg [-] [group [[-c] command]]
/usr/bin/size— List section sizes and total size
size [OPTIONS] objfile
/usr/bin/sort— Sort lines of text files
sort [OPTION] [file]
/usr/bin/split— Split a file into pieces
split [OPTION] [INPUT [PREFIX]]
/usr/bin/sum— Checksum and count the blocks in a file
sum [OPTION] [file]
/usr/bin/tac— Concatenate and print files in reverse
tac [OPTION] [file]
/usr/bin/tack— Terminfo action checker
tack [-itV] [term]
/usr/bin/test— Check file types and compare values
test EXPRESSION
/usr/bin/tic— The terminfo entry-description compiler
tic [-1CINRTcfrsx] [-e names] [-o dir] [-v[n]] [-w[n]] file
/usr/bin/tie— Merge or apply WEB change files
tie -c|-m outputfile masterfile changefile
/usr/bin/time— Run programs and summarize system resource usage
time [ OPTIONS ] COMMAND [ ARGS ]
/usr/bin/top— Display top CPU processestop [-] [d delay] [p pid] [q] [c] [S] [s] [i] [n iter] [b]
Trang 24/usr/bin/tput— Initialize a terminal or query terminfo database
tput [-Ttype] OPTION [parms ]
/usr/bin/tr— Translate or delete characters
tr [OPTION] SET1 [SET2]
/usr/bin/troff— Format documents
troff [ OPTIONS ] files
/usr/bin/tty— Print the file name of the terminal connected to standard input
tty [OPTION]
/usr/bin/ul— Do underlining
ul [-i] [-t terminal] [name ]
/usr/bin/users— Print the user names of users currently logged into the current host
users [OPTION] [ file ]
/usr/bin/vi— Screen text editor
vi [-eFlRrSv] [-c cmd] [-t tag] [-w size] [file ]
/usr/bin/view— Screen text editor
view [-eFRrSv] [-c cmd] [-t tag] [-w size] [file ]
/usr/bin/w— Show who is logged on and what they are doing
w - [husfV] [user]
/usr/bin/wall— Write a message to users
wall [file]
/usr/bin/watch— Execute a program periodically, showing output fullscreen
watch [-dhv] [-n <seconds>] [ interval=<seconds>] <command>
/usr/bin/wc— Print the number of bytes, words, and lines in files
wc [OPTION] [file]
Trang 25/usr/bin/whereis— Locate the binary, source, and manual page files for a command
whereis [ -bmsu ] [ -BMS directory -f ] filename
/usr/bin/write— Send a message to another user
write user [ttyname]
/usr/bin/zone— Query nameserver about domain names and zones
host [-v] [-a] [-t querytype] [options] -l zone [server]
/usr/sbin/accessdb— Dumps the content of a man-db database in a human able format.
read-accessdb [<index-file>]
/usr/sbin/addgroup— Add a user or group to the system
addgroup [options] [ gid ID] group
/usr/sbin/adduser— Add a user or group to the system
adduser [options][ home DIR][ no-create-home][ uid ID][ gid ID] user
/usr/sbin/arp— Manipulate the system ARP cachearp [-vn] [-H type] [-i if] -a [hostname]
/usr/sbin/cytune— Tune Cyclades driver parameters
cytune [-q [-i interval]] [-s value] [-g] [-t timeout] tty
/usr/sbin/pac— Printer/plotter accounting information
pac [-Pprinter] [-c] [-m] [-pprice] [-s] [-r] [name ]
/usr/sbin/readprofile— A tool to read kernel profiling information
readprofile [ options ]
/usr/sbin/tunelp— Set various parameters for the lpdevice
tunelp <device> [OPTION]
Trang 26Debian Packages
A ppendix C presents a list of commonly used Debian
packages with a short description of each package Not all packages are included since there are over 4,000 packages available Categories or package areas covered include:
Administrative Utilities, Base Utilities, Communication Programs, Editors, Graphics, Mail, Miscellaneous, Network, Newsgroups, Other OS’s and file systems, Shells, Sound, Utilities, and Web Software.
You can find a complete list of packages for each of the gories at packages.debian.org/stable.
cate-Administration utilities
Table C-1 shows common utilities for managing system resources, user accounts, and other system administration tasks and functions
Table C-1
Administration utilities
adjtimex 1.10-1 Utility to display or set the kernel
time variables
Slackware Packages with dpkg
anacron 2.1-5.1 A cron-like program that doesn’t
go by time
apmd 3.0final-1 Utilities for Advanced Power
Management (APM) on laptops
Continued
C
A P P E N D I X
Trang 27Table C-1 (continued)
apt-move 3.0-13 Move cache of Debian packages into a mirror hierarchy
removable media
aptitude 0.0.4a-4.1 Console based apt front-end
arpwatch 2.1a4-3 Ethernet/FDDI station activity monitor
autolog 0.35-3 Terminates connections for idle users
base-config 0.32 Debian base configuration package
boot-floppies 2.2.16 Scripts to create the Debian installation floppy set
bpowerd 2.2-1 Monitor UPS status for Best Patriot power supplies
calife 2.8.4-2 A lightweight alternative to Sudo
cfengine 1.5.3-4 Tool for configuring and maintaining network machines
chrony 1.10-3 It sets your computer’s clock from time servers on the Net
cron 3.0pl1-57 Management of regular background processing
cruft 0.9.6-0.1 Find any cruft built up on your system
debconf 0.2.80.16 Debian configuration management system
debconf-tiny 0.2.80.16 Tiny subset of debconf for the base system
debian-cd 2.2.2 [contrib] Tools for building (Official) Debian CD set
debsums 1.2.6 Tools to handle md5sums for installed packages
dialdcost 0.2-1 Cost estimation and X Control panel for DIALD
divine 0.7-2 Automatic IP configuration detection for laptops
dpkg-repack 1.2 Puts an unpacked deb file back together
dqs 3.2.7-3 [non-free] A Distributed Queuing System
eql 1.2-1 Load balancing tool for serial network connections
equivs 1.999.12 Circumventing Debian package dependencies
ext2resize 1.0.6-1 An ext2 filesystem resizer
extipl 4.22-4 Yet another boot selector for IBM-PC compatibles
extipl-boot 4.22-4 ExtIPL, an enhanced boot code (IPL) for IBM-PC
fbgetty 0.1.4-1 A console getty with and without framebuffer capability
Trang 28Package Description
file-rc 0.5.5 Alternative one-config file boot mechanism
genpower 1.0.1-11 Monitor UPS and handle line power failures
genromfs 0.3-5 This is the mkfs equivalent for the romfs filesystem
gnome-admin 1.0.3-2 Gnome Admin Utilities (gulp and logview)
gnome-print 0.10-5 The Gnome Print architecture
gnosamba 0.3.3-2 A graphical configuration utility for Samba
gpart 0.1f-1 Guess PC disk partition table, find lost partitions
hdparm 3.6-1 Tune hard disk parameters for high performance
i18ndata 2.1.3-10 GNU C Library: National Language (locale) data [source]
idled 1.16-8.1 [non-free] Idle Daemon Removes idle users
ja-trans 0.7-3.1 Japanese gettext message files
lavaps 1.9-1 A lava lamp of currently running processes
lexmark7000linux A printer driver for Lexmark 7000 “GDI” printers
0.1999-03-28-1 libgtop-daemon 1.0.6-1 gtopdaemon for monitoring remote machines (part of
Gnome)
libpam-ldap 43-2 Pluggable Authentication Module allowing LDAP interfaces
libpam-pwdfile 0.1-1 PAM module allowing /etc/passwd-like authentication
libpam-smb 1.1.5-2 Pluggable Authentication Module allowing Samba interface
librpm1-dev 3.0.3-1 RPM shared library, development kit
libsnmp4.1 4.1.1-2 UCD SNMP (Simple Network Management Protocol) Library
linuxconf 1.17r5-2 A powerful Linux administration kit
linuxconf-i18n 1.17r5-2 International language files for Linuxconf
linuxconf-x 1.17r5-2 X11 GUI for Linuxconf
loadlin 1.6a-4 A loader (running under DOS) for LINUX kernel images
locale-ja 14 Locale definition files for Japanese
Continued
Trang 29Table C-1 (continued)
locale-ko 4-3 Locale definition files for Korean
locale-vi 1-3 Locale definition files for Vietnamese
locale-zh 0.9+0.05-2 Locale definition files for Chinese zh_CN.GB2312 and zh_CN.GBK
locales 2.1.3-10 GNU C Library: National Language (locale) data [binary]
logcheck 1.1.1-4 Mails anomalies in the system logfiles to the administrator
logrotate 3.2-11 Log rotation utility
lshell 2.01-9 Enforce limits to protect system integrity
m68k-vme-tftplilo 1.1.2-1 Linux kernel TFTP boot loader for m68k VME processor boards
makepasswd 1.10-1 Generate and encrypt passwords
mdutils 0.35-27 Multiple Device driver utilities
members 19990831-2 Shows the members of a group; by default, all members
memstat 0.2 Identify what’s using up virtual memory
menu 2.1.5-3 Provides update-menus functions for some applications
mkrboot 0.9 Make a kernel + root image bootable from one disk or
from DOS
mon 0.38.15-1 Monitor hosts/services/whatever and alert about problems
moodss 9.0-2 Modular object-oriented dynamic spread-sheet
ncurses-term 5.0-6 Additional terminal type definitions
netenv 0.82-10 Configure your system for different network environments
opie-client 2.32-1.1 OPIE programs for generating OTPs on client machines
pciutils 1:2.1.2-2 Linux PCI Utilities (for 2.[123].x kernels)
pcmcia-source 3.1.8-16 PCMCIA Card Services source
powstatd 1.4.1-4 Configurable UPS monitoring daemon
printop 1.12-4 Graphical interface to the LPRng print system
psmisc 19-2 Utilities that use the proc filesystem
radiusclient1 0.3.1-7 /bin/loginreplacement which uses the RADIUS protocol
for authentication
Trang 30Package Description
raidtools 0.42-21 Utilities to support “old-style” RAID disks
raidtools2 0.90.990824-5 Utilities to support “new-style” RAID disks
satan 1.1.1-18 [non-free] Security Auditing Tool for Analysing Networks
shapetools 1.4pl6-4 Configuration and release management using AtFS
sudo 1.6.2p2-1 Provides limited super user privileges to specific users
suidmanager 0.43.2 Manage file permissions
svgatextmode 1.9-3 Run higher-resolution text modes
syslog-ng 1.4.0rc3-2 Next generation logging daemon
syslog-summary 1.8 Summarize the contents of a syslog log file
systune 0.5.3 Kernel tuning through the /proc filesystem
tcpquota 1.6.15-7.1 A dialout/masquerading monitoring package
tmpreaper 1.4.11 Cleans up files in directories based on their age
tripwire 1.2-16.1 [non-free] A file and directory integrity checker
ttysnoop 0.12c-7 TTY Snoop — allows you to spy on telnet + serial connections
userlink-source 1:0.99a-1 BSD IP Tunneling Driver for Linux (source package)
userv 1.0.1.1potato User Services — program call across trust boundaries
uutraf 1.1-7 An UUCP traffic analyzer and cost estimator
whowatch 1.3-1 Real-time user logins monitoring tool
xezmlm 1.0.3-6 [contrib] A ezmlm mailinglist configuration tool for the X Window
System
xlogmaster 1.6.0-5 A program to monitor logfiles
zh-trans 0.8.1-2 Chinese (zh_CN and zh_TW) message files and manpages
Trang 31ae 962-26 Anthony’s Editor — a tiny full-screen editor
base-files 2.2.0 Debian base system miscellaneous files
base-passwd 3.1.7 Debian Base System Password/Group Files
bsdutils 1:2.10f-5.1 Basic utilities from 4.4BSD-Lite
console-tools 1:0.2.3-10.3 Linux console and font utilities
console-tools-libs Shared libraries for Linux console and font manipulation
1:0.2.3-10.3 debianutils 1.13.3 Miscellaneous utilities specific to Debian
dpkg-mountable 0.8 Enhanced access method for dselect
dpkg-multicd 0.16.1 Installation methods for multiple binary CDs
e2fsprogs 1.18-3 The EXT2 file system utilities and libraries
elvis-tiny 1.4-9 Tiny vi compatible editor for the base system
fileutils 4.0l-8 GNU file management utilities
findutils 4.1-40 Utilities for finding files — find, xargs, and locate
gettext-base 0.10.35-13 GNU Internationalization utilities for the base system
Trang 32Package Description
hostname 2.07 A utility to set/show the host name or domain name
isapnptools 1.21-2 ISA Plug-And-Play configuration utilities
kernel-headers-2.0.38 Header files related to Linux kernel version 2.0.38
2.0.38-3 kernel-image-2.0.38 Linux kernel binary image for version 2.0.38
2.0.38-3 kernel-image-2.2.17 Linux kernel binary image for version 2.2.17
2.2.17pre6-1
2.2.17-compact 2.2.17pre6-1 kernel-image-2.2.17-ide Linux kernel binary image for version 2.2.17
2.2.17pre6-1 kernel-image-2.2.17-idepci Linux kernel binary image
2.2.17pre6-1 ldso 1.9.11-9 The Linux dynamic linker, library and utilities
libc6 2.1.3-10 GNU C Library: Shared libraries and time-zone data
libgdbmg1 1.7.3-26.2 GNU dbm database routines (runtime version) [libc6 version]
libncurses5 5.0-6 Shared libraries for terminal handling
libnet-perl 1.0703-3 Implementation of Internet protocols for Perl
libnewt0 0.50-7 Not Erik’s Windowing Toolkit — text mode windowing with
slang
libpam-modules 0.72-9 Pluggable Authentication Modules for PAM
libpam-runtime 0.72-9 Runtime support for the PAM library
libpam0g 0.72-9 Pluggable Authentication Modules library
libreadline4 4.1-1 GNU readline and history libraries, runtime libraries
libstdc++2.10 1:2.95.2-13 The GNU stdc++ library
libwrap0 7.6-4 Wietse Venema’s TCP wrappers library
lilo 1:21.4.3-2 LInux LOader — The Classic OS loader can load Linux and
others
makedev 2.3.1-44 Creates special device files in /dev
mawk 1.3.3-5 A pattern scanning and text processing language
Continued
Trang 33Table C-2 (continued)
modconf 0.2.26.14 Device driver configuration
modutils 2.3.11-8 Linux module utilities
mount 2.10f-5.1 Tools for mounting and manipulating filesystems
ncurses-base 5.0-6 Descriptions of common terminal types
ncurses-bin 5.0-6 Terminal-related programs and man pages
netbase 3.18-4 Basic TCP/IP networking binaries
passwd 19990827-20 Change and administer password and group data
pcmcia-cs 3.1.8-16 PCMCIA Card Services for Linux
pcmcia-modules- PCMCIA Modules for Linux (kernel 2.2.17)
2.2.17 3.1.8-14+
2.2.17pre6+1 pcmcia-modules-2.2.17- PCMCIA Modules for Linux (kernel 2.2.17-compact)
compact 3.1.8-14+
2.2.17pre6+1 pcmcia-modules- PCMCIA Modules for Linux (kernel 2.2.17-ide)
2.2.17-ide 3.1.8-14+
2.2.17pre6+1 pcmcia-modules- PCMCIA Modules for Linux (kernel 2.2.17-idepci)
2.2.17-idepci 3.1.8-14+2.2.17pre6+1 perl-5.004-base 5.004.05-6 The Pathologically Eclectic Rubbish Lister
perl-5.005-base The Pathologically Eclectic Rubbish Lister
5.005.03-7.1 perl-base 5.004.05-1.1 Fake package assuring that one of the -base packages is
installed
ppp 2.3.11-1.4 Point-to-Point Protocol (PPP) daemon
pppconfig 2.0.5 A text menu based utility for configuring ppp
procps 1:2.0.6-5 The /proc filesystem utilities
setserial 2.17-16 Controls configuration of serial ports
shellutils 2.0-7 The GNU shell programming utilities
slang1 1.3.9-1 The S-Lang programming library — runtime version
Trang 34Package Description
syslinux 1.48-2 Bootloader for Linux/i386 using MS-DOS floppies
textutils 2.0-2 The GNU text file–processing utilities
update 2.11-1 Daemon to periodically flush filesystem buffers
util-linux 2.10f-5.1 Miscellaneous system utilities
whiptail 0.50-7 Displays user-friendly dialog boxes from shell scripts
adbbs 3.0-1.1 ad! BBS A perl-based bbs or easy menu system
gettyps 2.0.7j-8 [non-free] Replacement for getty
hylafax-client 4.0.2-14 HylaFAX client software
hylafax-server 4.0.2-14 HylaFAX server software
ifcico 2.14tx8.10-11 Fidonet Technology transport package
ifgate 2.14tx8.10-11 Internet to Fidonet gateway
lrzsz 0.12.21-3 Tools for zmodem and ymodem file transfer
mgetty-docs 1.1.21-2.1 Documentation Package for mgetty
mgetty-fax 1.1.21-2.1 Faxing tools for mgetty
Continued