Linux	QuickRef	Linux

version 2.0.2	October 2003

Linux is a Registered Trademark of Linus Torvalds.
Copyright 2000-2003 David D. Scribner.
This Document May Be Freely Distributed in Accordance With The
GNU Free Documentation License
(a copy which is provided in the OpenOffice file's document properties).

Contents

Topic Page
Mounting Filesystems 1 Finding Files and Text Within Files 1 Move Copy, Delete and View Files 1-2 Meta Characters 2 Regular Expressions 2 File Permissions 2 Symbolic Links 2-3 chmod Modes 3 User Administration 3 Printing 3 man Pages 3-4 Shutdown & Reboot 4 Installing Software 4 Modules 4 Configuration Files 4-5 System Services 5 Crontab 5 Networking 5 Archiving 5 Bash Shell 5-6 Vim / Vi Editor 6 X Windows 6 ssh and GnuPG 6 Tips & Tricks 6-7 GNU/Linux Links 7-8

Unless noted, all commands are to be entered on one line
(use the " \" continuation character if needed). Mounting Filesystems

mount -t msdos /dev/fd0H1440 /mnt/floppy	Mount an MS-DOS formatted floppy disk at /mnt/floppy.
mount -t iso9660 /dev/cdrom /mnt/cdrom	Mount a CD-ROM drive at /mnt/cdrom.
mount -t vfat /dev/hda1 /mnt/win	Mount a VFAT hard drive partition hda1 at /mnt/win.
mount -t smbfs //system/share/ /mnt/samba	Mount a SMB share located at //system/share at /mnt/samba.
mount -t iso9660 -o loop image.iso /mnt/iso	Mount an ISO image as a filesystem at /mnt/iso using the loopback device.
mount -t ext2 /dev/pda /mnt/ezdrive	Mount a Linux filesystem formatted SyQuest EZ-Drive cartridge at /mnt/ezdrive.
umount /mnt/cdrom	Unmount the CD-ROM.
usermount	Executes graphical utility for mounting and unmounting filesystems.
exportfs -ra	Re-apply NFS export directives as listed in /etc/exports.

Finding Files and Text Within Files

find / -name filename	Starting at the / directory, find the file “filename”.
find / -name “*string*”	Starting at the / directory, find the file containing the word “string”.
find / -perm +4000 -user root -print	Find existing files on the system that have their SUID root permissions set.
find / -perm +2000 -group <group> -print	Find existing files on the system that have their SGID permissions set.
find / -nouser -print	Find existing files on the system that don't belong to any user listed in /etc/passwd.
info	Lists the commands and utilities installed with brief description as to what they are used for, or do.
locate filename	Locate a file “filename” using the updatedb database (see next).
updatedb	Create or update the database used by the locate command.
apropos subject	List man pages for “subject”, searches the whatis database for strings.
whatis	Search the whatis database for complete words.
makewhatis	Create or update the database used by whatis and apropos commands.
which filename	Show the subdirectory containing the executable file “filename”.
grep –r textstring /dir	Starting with the directory “/dir”, recursively find and list all files containing the string “textstring”.

Move Copy, Delete and View Files

mv filename /home/dirname	Move the file “filename” to the directory /home/dirname.
cp filename /home/dirname	Copy the file “filename” to the directory /home/dirname.
rm name	Remove the file or directory “name”.
rm -rf dir	Remove the entire directory “dir”, forcing the removal of included files and subdirectories recursively as well.
ls -l	List files in current directory in long format.
ls -F	List files in current directory and indicate the file types.
ls -laC	List all files in current directory in long format and display in columns.
cat filename	Display the file “filename”.
more filename	Display the file “filename” one page at a time. Advance pages by pressing the spacebar.
less filename	Display the file “filename” one page at a time. Advance pages by pressing the spacebar, backup with the “b” key.
zless filename	Same as above, only used with files compressed with gzip.
head filename	Display the first 10 lines of the file “filename”.
head -25 filename	Display the first 25 lines of the file “filename”.
tail filename	Display the last 10 lines of the file “filename”.
tail -25 filename	Display the last 25 lines of the file “filename”.

Meta Characters

*	Multiple-character wildcard.
?	Single-character wildcard.
[a-z0-9]	Single-character character range (“a” through “z” or “0” through “0”).
[abc123]	Single-character choice (“a”, “b”, “c”, “1”, “2” or “3”).
[!xyz]	Single-character choice, but as not the characters “x”, “y” or “z”.

Regular Expressions

.	Match a single character (functionally equivalent to how the '?' character works in glob expansions).
*	Match zero or more repeated occurrences of the previous character.
+	Match one or more repeated occurrences of the previous character.
?	Match zero or one repeated occurrences of the previous character.
^	Matches an expression that follows it at the beginning of a line. Needs double quotes when used with grep.
$	Matches the regular expression that precedes it at the end of a line. Needs single quotes when used with grep.
[a-z0-9]	Single-character range (“a” through “z” or “0” through “0”).
[abc123]	Single-character choice (“a”, “b”, “c”, “1”, “2” or “3”).
[^x,y,z]	Single-character choice, but not the characters “x”, “y” or “z”.
(abc)	Grouped characters “abc”.
\	Used to escape regular expression characters such as +, *, and ^ to include the literal character in a match.

File Permissions

d	User r w x	Group r w x	Others r w x	
File Type	Execute
-=file d=directory l=link b/c=block/char device	Write Read
When the command “ls –l” is used, a list of file names is displayed. The first column in this list details the file type and the permissions applied to the file. If a permission is denied for a set, User (Owner), Group and Others, it is represented by a –.
Read = 4 Write = 2 Execute = 1	File permissions are altered by giving the “chmod” command and the appropriate octal code for each set. Ex.: chmod 764 filename will make the file “filename” r-w-x for the user, r-w for the group, and r for any others.

Symbolic Links

symlink -r /	List all the symbolic links on the system.
symlink -rv / | fgrep "dangling"	Find all symbolic links that are "dangling", excluding other mounted filesystems.
ln -l linkname	Display the link-path for a link.
find . -type l -exec ls -l {} \;	Find all symbolic links and show what they point to.

chmod Modes

chmod 600	Read and write permissions for user only.
chmod 700	Read, write and execute permissions for user only.
chmod 755	Full permission for user, read and execute for group and others.
chmod 711	Full permission for user, execute for group and others.
chmod 444	Read permissions only for everybody.
chmod +x filename	Make the file “filename” executable for everybody; user, group and others.
chmod go-w filename	Revoke write permissions for group and others on the file “filename”.
chmod ug=r filename	Set the permissions to readable only for user and group on the file “filename”.
chmod a=r,u+w filename	Set the permissions to readable only for all (everybody) and add write-able for user on the file “filename”.

User Administration

useradd username	Create a new user account named “username”.
passwd username	Assign a password to “username”.
su -or- su -	Switch user to root, or root and to include root’s set environment (must know root password to use).
su -c "command"	Run “command” (include any options within the quotes) as root.
su username	Switch user to “username” .
exit	Exit, logoff or logout of account.

Printing

/etc/rc.d/init.d/lpd start	Start the print daemon.
/etc/rc.d/init.d/lpd stop	Stop the print daemon.
/etc/rc.d/init.d/lpd status	Display the status of the print daemon.
lpq	Query and display jobs in print queue.
lpq -a	As above, only for all printers controlled by the lpd daemon.
lpr	Print a file.
lprm	Remove jobs from print queue.
lprm -a	Remove all jobs from the print queue for the logged user.
lprm -a all	Remove all jobs for all users from the print queue (run as root).
lpc	Printer control tool.
printtool	Run the X Windows printer setup utility.

man Pages

man -k word	Display man pages containing “word”.
man subject | col -b | lpr	Print the man page “subject” as plain text.
man -t subject | col -b | lpr	Print the man page “subject” as Postscript.
Manual pages are organized into topics:
/usr/man/man1	Commands - Commands you run from within a shell.
/usr/man/man2	System Calls - Documentation for kernel functions.
/usr/man/man3	Library Calls - Manual pages for libc functions.
/usr/man/man4	Special Files - Information about files in the /dev/ directory.
/usr/man/man5	File Formats - Details of formats for /etc/passwd and other files.
/usr/man/man6	Games.
/usr/man/man7	Macro Packages - Descriptions of the Linux file system, manual pages, and others.
/usr/man/man8	System Management - Manual pages for root operator utilities.
/usr/man/man9	Kernel Routines - Documentation on Linux kernel source routines or kernel module specifications.
And each man page is organized into sections:
Name	The name of the command and a brief description.
Synopsis	How to use the command and command-line options.
Description	An explanation of the program and its options.
Files	A list of files used by the command and their location.
See Also	A list of related man pages.
Diagnostics	A description of unusual output.
Bugs	Known problems.
Author	The program's main author and other contributors.

Shutdown & Reboot

shutdown -h now -or- init 0	Shutdown the system now and halt (no reboot).
shutdown -r now -or- init 6	Shutdown the system now and reboot.
shutdown -r 5	Shutdown the system in 5 minutes and reboot.
halt	Stop all processes and shutdown.
reboot	Stop all processes and reboot.

Installing Software

./configure ; make ; make install	Execute the scripts preparing the source files for compiling and installation on the system.
apt-get update	Update package list.
apt-get upgrade	Upgrade installed packages.
apt-get upgrade -u	Upgrade installed packages. Will not install new or remove old packages (they're put on “hold”).
apt-get install name	Install package ”name” (also resolves any dependencies).
apt-get remove name	Removes package “name” (also removes any unneeded dependencies).
dpkg -i pkg.deb	Install package “pkg.deb”.
dpkg -r pkg.deb	Removes package “pkg.deb”.
dpkg -iGRE temp	Install all packages in the directory “temp” (including subdirectories) that are newer or not already installed.
rpm -ivh name.rpm	Install the RPM package “name.rpm”.
rpm -Uvh name.rpm	Upgrade or install RPM package “name.rpm”.
rpm -Fvh name.rpm	Upgrade only previously installed RPM package “name.rpm”.
rpm -e name	Delete the RPM package “name” (do not include “.rpm” extension).
rpm -e name --nodeps	Force deletion of RPM package “name, even if dependencies are present.
rpm -l name	List the files in the RPM package “name”.
rpm -ql name	Query for the installed version and list the files in the RPM package “name”.
rpm -Va	Verify the integrity of all currently installed packages.
rpm -qai	Query all installed packages, displaying details on each package.
rpm -i --force name	Reinstall package “name”, forcing the installation of all files included.

Modules

insmod	Inserts a module into the kernel.
lsmod	Lists the modules currently used by the kernel.
rmmod	Removes a module (use 'lsmod' to determine module name).
depmod	Creates a "Makefile" dependency file (modules.dep).
modprobe	Loads the modules.dep dependency file created by 'depmod'.

Configuration Files

/etc/inittab	Specifies the runlevel that the system should boot into.
/etc/fstab	List of devices, mount points and mount options (read, write, etc.).
/etc/exports	Filesystems being exported by the NFS (Network File System) daemon.
/etc/motd	Message Of The Day; displayed to all users at login.
/etc/rc.d/rc.local	Shell script that is executed at the end of boot process.
/etc/profile	Global environment variables.
/etc/bashrc	Global functions and aliases.
/etc/cron.*	Directories that automatically execute scripts stored within at timed intervals.
/etc/HOSTNAME	Contains full host name, including domain.
/etc/hosts	A list of known host names and IP addresses on the network.
/etc/resolv.conf	Defines IP addresses of DNS servers.
/etc/samba/smb.conf	Configuration file for the Samba server, allowing file/print sharing with MS Windows clients.
/etc/httpd/conf/ httpd.conf	Configuration file for the Apache web server.
/etc/X11/XF86Config	Configuration file for X Windows.
/usr/X11R6/lib/X11/ app-defaults	X Window application defaults.
~/.Xdefaults	Configuration file for some X Window applications.
~/.xinitrc	Defines the window manager loaded by X Windows.
~/.Xclients	Defines the window manager loaded by X Windows (Red Hat).

System Services

chkconfig --list	Reports whether an xinetd system service has been started or stopped.
chkconfig --list <daemon>	Checks the status of a particular service.
chkconfig --level 345 nscd off	Turns “nscd” service off in runlevels 3, 4, and 5.
/etc/init.d/<daemon> stop -or- start -or- restart	Stop, start or restart the individual service <daemon>.
service <daemon> stop -or- start -or- restart	Stop, start or restart the individual service <daemon>. (rh)
/etc/init.d/xinetd stop -or- start -or- restart	To stop, start or restart a service which is managed by xinetd.
service xinetd stop -or- start -or- restart	To stop, start or restart a service which is managed by xinetd. (rh)
Linux Runlevels	3	Multiuser mode (console)
0	Halt	4	unused
1	Single-user mode	5	Multiuser mode (X Windows)
2	Multiuser, without NFS	6	Reboot

Crontab

crontab -u <username> -e	Edit a user's crontab file directly using the environment-specified editor.
crontab -u <username> <filename>	Read a file of cron job entries into a user's crontab file.
0,15,30,45 * * * * fetchmail	Run the command 'fetchmail' every 15 minutes.
* */4 * * * backup >> /root/backup-log 2>&1	Run a backup job every 4 hours, writing all stdout and stderr to a log file.
Crontab	/etc/crontab format
Entry	Meaning	* * * * * command
0-59	Minute	
0-23	Hour	
1-31	Day of Month	
1-12	Month	
0-7	Day of Week	

Networking

ifconfig -a	List IP address for all devices on system.
ifconfig eth0 192.168.1.12 broadcast 192.168.1.255 netmask 255.255.255.0	Assign the IP address 192.168.1.12 to the first Ethernet device (eth0), using standard Class C broadcast and netmask.
route add -net default gw 192.168.1.100 netmask 0.0.0.0 metric 1	Adds a route for a default gateway located at 192.168.1.100 for the system.

Archiving

tar -xvf archive.tar	Decompress the files archived in the tarred file “archive.tar.gz”, listing the contents to the console.
tar -xzvf archive.tar.gz	Decompress the files archived in the gzipped and tarred file “archive.tar.gz”.
tar -xjvf archive.tar.bz2	Decompress the files archived in the bzip2 and tared file “archive.tar.bz2”.
tar -tvf archive.tar	Display list of contents in file “archive.tar”.
tar -cvf filename	Create a tar file, “filename.tar”, from file “filename”.
tar -cxvf filename	Create a gzipped tar file, “filename.tar.gz”, from file “filename”.
tar -cjvf filename	Create a bzip2 tar file, “filename.tar.bz2”, from file “filename”.
tar -cMf /dev/fd0	Backup the contents of the current directory, including subdirectories, to multiple floppy disks.
bzip2 -dc <file.bz2> | -tar -xvf -	Un-bzip2 and untar “file.tar.bz2”

Bash Shell

history	Search through the history file.
history 20	List the last 20 commands entered.
history | grep variable	Pipe the output of history though the grep command, searching for “variable”.
!!	Executes the last command entered in the history file.
!#	Executes the command numbered "#" in the history file.
!string	Executes the command with the most recent matching string “string”.
env	Display the shell environment variables.
printenv	Display the environment variables in use.

Vim / Vi Editor

:q	Quit, saving changes.
:q!	Absolute quit (no prompt).
:wq	Write file, then quit.
x	Delete character at cursor.
dw -or- dd	Delete word or delete line.
D	Delete from cursor to EOL.
u	Undo.
.	Repeat last edit command.
:set paste -and- :set nopaste	Allows pasting indented lists without cascading the indents. Use ':set nopaste” after pasting.
vim `find . -name "*" -exec grep -l "pattern" {} \; -print`	Search for a pattern within the files in the current directory, then edit the file if found.

X Windows

startx	Start X Windows.
startx -- :1	Run an X session on another terminal. Use Ctrl-Alt-F7 and Ctrl-Alt-F8 to switch displays.
XF86Setup	An X configuration utility with automatic probing of graphics cards.
Xconfigurator	Another X configuration utility with automatic probing of graphics cards.
xf86config	A text-based X configuration menu.
xvidtune	An X graphics tuning utility.
gnome-session	Starts GNOME in the .xinitrc or .Xclients files.
startkde	Starts KDE in the .xinitrc or .Xclients files.
fvwm95	Starts fvwm95 in the .xinitrc or .Xclients files.
Alt-Esc	Display a list of active windows.
Ctrl-Alt+ -or- Ctrl-Alt–	Increase or decrease screen resolution.
Ctrl-Alt-Fn	Switch to virtual console n, where n is a number from 1 to 6.
Ctrl-Alt-F7	Return to the current X session.
Shift-Ctrl-F8	Resize the selected window.
Shift-Ctrl-r	Refresh the screen.
Shift-Ctrl-x	Start an xterm session.
Ctrl-Alt-Esc	Invoke the xkill cursor.
Ctrl-Alt-BkSpace	Kill the X-server.

ssh and GnuPG

ssh-keygen	Generate a pair of public and private keys.
ssh -t myserver top	Run the console program “top” on “myserver” remotely.
gpg –gen-key	Generate a pair of public and secret (private) keys.
gpg –output revokedkey.asc --gen-revoke keyID	Generate a revocation certificate for a private key, redirected to file "revokedkey.asc".
gpg -r username -sea filename	Encrypt file "filename" for recipient "username", creating signed armored ASCII text file "filename.asc".
gpg -o filename -d filename.asc	Decrypt the file "filename.asc", producing the original file "filename".
gpg --import user.asc	Import public key for user to your public keyring from file "user.asc".
gpg --export –armor username > key.asc	Export public key from your keyring to an ASCII armored file "key.asc".
gpg --list-keys	List keys in your public keyring.
gpg –fingerprint username	Display fingerprints for keys in public keyring for "username".
gpg -c filename	Symmetrically encrypt the file “filename”.
tar -cf - /dir | gpg -c -o encrypted_dir.gpg	Create a tar file of a directory, then symmetrically encrypt the file (GnuPG uses gzip compression natively).

Tips & Tricks

df -h	Displays disk filesystems mounted, including space used and available, in “human-readable” form.
/sbin/e2fsck hda5	Execute the filesystem check utility on the hard drive partition hda5 (unmount hda5 first!).
mkbootdisk –-device /dev/fd0 –2.4.20	Creates a boot disk on the floppy drive with version 2.4.20 of the kernel.
fdformat /dev/fd0H1440	Format a floppy disk in device fd0 as high-density 1.44 MB.
/sbin/mke2fs -c /dev/fd0	Format a floppy disk with the Linux ext2 filesystem, checking for bad blocks.
dd if=/dev/hda of=/dev/hdb	Create a data dump of one hard drive onto another (ghosting).
cat /var/log/messages | less	Display the system log with paging.
cat /var/log/dmesg | less	Display the boot messages log with paging; useful for troubleshooting.
dmesg | less	Same as above.
linux single	Issued at LILO prompt, will boot into single-user mode (if root password is lost, boot “linux single” and change password).
ps	List current running processes for logged user.
ps -aux	List all current running processes for all users and daemons.
kill 1234	Kill (stop) a process with job ID of “1234”.
kill -9 `ps -fu uname |awk '{ print $2 } '|grep -v PID`	Run as root, kills all processes being run by the user “uname”.
sysreport	Collects detailed info on the system's hardware and setup, creating a compressed tar file in the /tmp directory by that name. (rh)
ulimit -c	Displays current limit on core file size.
ulimit -c 1000	Sets allowable size limit on core files to 512K (1000 x 512-byte blocks).
uname -a	Displays system info (OS, host name, kernel version, date, time, time zone, year, processor type and label).
Alt-Fn	Switch to virtual console n, where n is a number from 1 to 7 (the default maximum).
Alt-→	Switch to the next highest virtual console.
Alt-←	Switch to the next lowest virtual console.
reset	Resets your terminal console if a binary file was displayed with cat.
stty -s	Display what special characters (such as ^C for interrupt, ^U for kill, ^Z to stop, ^Q to quit, etc.) are used on the system.
split -b 1420k bigfile	Split “bigfile” into smaller 1420k files, xaa, xab, xac, etc. that fit on a floppy disk.
cat xaa xab xac > bigfile	Reassemble “bigfile” from smaller files created with 'split'.
rename .htm .html *	Rename all files in the directory with “.htm” extensions to “.html”.
for i in $1 ; do mv "$i" `echo $i | sed 's/ /_/g'` ; done	Rename all files in the directory, replacing any spaces in filenames with the underscore character.
rdate -s ntpserver && hwclock --systohc	Synchronize your machine's system and hardware clocks with a network time server (given as a hostname or IP address).
ifconfig | awk '/inet/{print $2}' | awk -F: '{print $2}'	Lists just the IP addresses currently bound to the system.
ldd /path/program	List all of the shared library dependencies used by “program”.

GNU/Linux Links

http://www.kernel.org/ Linux Kernel Archives – The kernel sources.
http://www.fsf.org/ Free Software Foundation – GNU General Public License (GPL) and GNU software utilities and commands.
http://www.debian.org/ Debian Linux – GNU/Linux distributor.
http://www.redhat.com/ Red Hat Linux – GNU/Linux distributor.
http://www.suse.com/ SuSE – GNU/Linux distributor.
http://www.mandrake.com/ Mandrake – GNU/Linux distributor.
http://www.slackware.com/ Slackware Linux Project – GNU/Linux distributor.
http://www.gentoo.org/ Gentoo Linux – GNU/Linux distributor.
http://www.apache.org/ Apache Software Foundation – web server software.
http://www.squid-cache.org/ Squid – web proxy cache software.
http://www.samba.org/ Samba – file sharing with Windows systems.
http://www.sendmail.org/ Sendmail – email server software.
http://www.mysql.com/ MySQL – SQL database server software.
http://www.perl.com/ Perl – software programming/scripting software.
http://wwwxfree86.org Xfree86 Project – X11 software.
http://www.gnome.org/ GNOME Project – desktop environment software.
http://www.kde.org/ K Desktop Environment – desktop software.
http://www.openoffice.org/ OpenOffice.org – Office suite software.
http://www.vim.org/ Vim (Vi IMproved) – text editing software.
http://www.mozilla.org/ Mozilla – web browser software.
http://www.mutt.org/ Mutt – email client software.
http://www.gnupg.org/ GnuPG – GNU Privacy Guard personal encryption and digital signature software.
http://www.gimp.org/ GIMP – GNU Image Manipulation Program.
http://wwwroaringpenguin.com/ Roaring Penguin – PPPoE software.
http://www.tldp.org/ The Linux Documentation Project – HOWTOs, manuals and documentation.
http://www.icon.co.za/~psheer/book/rute.html.gz RUTE Linux – book on Linux.
http://oreillynet.com/linux/cmd/ O'Reilly Linux Commands – online reference.
http://www.pathname.com/fhs/ Filesystem Hierarchy Standard – filesystem layout and structure standards.
http://www.dsl.org/book/ Linux Cookbook – tips, tricks and recipes for Linux.
http://www.oualline.com/vim-cook.html Vim Cookbook – tips, tricks and recipes for Vim.
http://cvsbook.red-bean.com/ CVS Book – very good book on using CVS.
http://www.perldoc.com/ PerlDoc – Perl documentation.
http://www.ooodocs.org/ OOo Docs – OpenOffice forums and docs.
http://linux.oreilly.com/ O'Reilly Linux – Linux articles and books.
http://www-106.ibm.com/developerworks/linux/ IBM developerWorks – Linux articles and tutorials.
http://www.nichedev.org/ Niche Development – Linux and technical docs.
http://www.linuxgazette.com/ Linux Gazette – monthly Linux magazine.
http://www.linuxjournal.com/ Linux Journal – monthly Linux magazine.
http://www.linux-mag.com/ Linux Magazine – monthly Linux magazine.
http://www.linux.com/ Linux.com – news, articles and resources.
http://www.lwn.net/ Linux Weekly News – news and resources.
http://www.rootprompt.org/ RootPrompt – news and resources.
http://www.promote-opensource.org/ Promote Open Source – news and resources.
http://www.linuxguru.net/ LinuxGuru – news and articles.
http://www.ugu.com/ UNIX Guru Universe – tips and resources.
http://www.sourceforge.net/ SourceForge – open-source software projects.
http://www.rpmfind.net/ RPMfind – online RPM package search.
http://www.linuxsecurity.com/ Linux Security – alerts and patch resources.
http://www.linmodems.org/ LinModems – Linux modem compatibility list.
http://freshmeat.net/ freshmeat – Linux and open-source software.
http://counter.li.org/ Linux Counter – Registry of Linux users; get counted!
http://www.thelinuxshow.com/ The Linux Show – a weekly Linux talk show.

Linux QuickRef 1

Linux QuickRef

Linux Quick Reference

GNU Free Documentation License
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.
This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.
We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.
A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.
The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition.
The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title
distinct from that of the Document, and from those of
previous versions (which should, if there were any, be
listed in the History section of the Document). You may
use the same title as a previous version if the original
publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modifications in
the Modified Version, together with at least five of the
principal authors of the Document (all of its principal
authors, if it has fewer than five), unless they release you
from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license
notice giving the public permission to use the Modified
Version under the terms of this License, in the form shown
in the Addendum below.
G. Preserve in that license notice the full lists of Invariant
Sections and required Cover Texts given in the Document's
license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title,
and add to it an item stating at least the title, year, new
authors, and publisher of the Modified Version as given on
the Title Page. If there is no section Entitled "History" in the
Document, create one stating the title, year, authors, and
publisher of the Document as given on its Title Page, then
add an item describing the Modified Version as stated in
the previous sentence.
J. Preserve the network location, if any, given in the Document
for public access to a Transparent copy of the Document,
and likewise the network locations given in the Document
for previous versions it was based on. These may be placed
in the "History" section. You may omit a network location for
a work that was published at least four years before the
Document itself, or if the original publisher of the version it
refers to gives permission.
K. For any section Entitled "Acknowledgements" or
"Dedications", Preserve the Title of the section, and
preserve in the section all the substance and tone of each
of the contributor acknowledgements and/or dedications
given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section
titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled
"Endorsements" or to conflict in title with any Invariant
Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:
Copyright (c) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.2 or any later version published by the
Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. A copy of the
license is included in the section entitled "GNU Free
Documentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Text
being LIST.
If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.
If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.

David D. Scribner

2003-09-20T22:05:00