Thursday, July 28, 2011

Linux Commands


1  Introduction

This is my own summary of useful Linux abbreviations, directories, files, and commands. I use my own annotations to recall useful options and arguments that are not necessarily documented in easy-to-find places. I quite often call up this file when I can't remember the syntax of a command that I use often (but not often enough to remember the syntax!). I also editorialize on the relative usefulness of different types of programs.
This document is work in progress. Send suggested changes and corrections to ambler.steven@uqam.ca
O'Reilly has just published online an alphabetical list of commands from Linux in a Nutshell. It is available here. It contains more detailed explanations of many of the commands listed here.

2  Shorthand at the Command Prompt

Some of these are specific to the bash shell. I have not experimented enough with other shells to know which are common to all shells. See also the ``Bash Reference Card'', SSC (2000), available online.
  • / - root directory
  • ./ - current directory
  • ./command_name - run a command in the current directory when the current directory is not on the path
  • ../ - parent directory
  • ~ - home directory
  • $ - typical prompt when logged in as ordinary user
  • # - typical prompt when logged in as root or superuser
  • ! - repeat specified command
  • !! - repeat previous command
  • ^^ - repeat previous command with substitution
  • & - run a program in background mode
  • [Tab][Tab] - prints a list of all available commands. This is just an example of autocomplete with no restriction on the first letter.
  • x[Tab][Tab] - prints a list of all available completions for a command, where the beginning is ``x''
  • [Alt][Ctrl][F1] - switch to the first virtual text console
  • [Alt][Ctrl][Fn] - switch to the nth virtual text console. Typically, there are six on a Linux PC system.
  • [Alt][Ctrl][F7] - switch to the first GUI console, if there is one running. If the graphical console freezes, one can switch to a nongraphical console, kill the process that is giving problems, and switch back to the graphical console using this shortcut.
  • [ArrowUp] - scroll through the command history (in bash)
  • [Shift][PageUp] - scroll terminal output up. This also works at the login prompt, so you can scroll through your boot messages.
  • [Shift][PageDown] - scroll terminal output down
  • [Ctrl][Alt][+] - switch to next X server resolution (if the server is set up for more than one resolution)
  • [Ctrl][Alt][-] - change to previous X server resolution
  • [Ctrl][Alt][BkSpc] - kill the current X server. Used when normal exit is not possible.
  • [Ctrl][Alt][Del] - shut down the system and reboot
  • [Ctrl]c - kill the current process
  • [Ctrl]d - logout from the current terminal
  • [Ctrl]s - stop transfer to current terminal
  • [Ctrl]q - resume transfer to current terminal. This should be tried if the terminal stops responding.
  • [Ctrl]z - send current process to the background
  • reset - restore a terminal to its default settings
  • [Leftmousebutton] - Hold down left mouse button and drag to highlight text. Releasing the button copies the region to the text buffer under X and (if gpm is installed) in console mode.
  • [Middlemousebutton] - Copies text from the text buffer and inserts it at the cursor location. With a two-button mouse, click on both buttons simultaneously. It is necessary for three-button emulation to be enabled, either under gpm or in XF86Config.

3  Typical Dot Files

There is some redundancy across these programs. For example, the look and behavior of emacs can be customized by usinng the .emacs file, but also by adding the appropriate modifications to the .Xdefaults file. Default versions of these files are often installed in users' home directories when the software packages that use them are installed. If a program doesn't find its configuration file in the user's home directory, it will often fall back on a sytem-wide default configuration file installed in one of the subdirectories that the package lives in.
  • .bash_logout - file executed by bash shell on logout
  • .bash_profile - initialization of bash shell run only on login. Bash looks first for a .bash_profile file when started as a login shell or with the -login option. If it does not find .bash_profile, it looks for .bash_login. If it doesn't find that, it looks for .profile. System-wide functions and aliases go in /etc/bashrc and default environment variables go in /etc/profile.
  • .bashrc - initialization command run when bash shell starts up as a non-login shell
  • .cshrc - initialization commands that are run automatically (like autoexec.bat) when C shell is initiated

  • .emacs - configuration file for emacs editor

  • .fvwmrc - configuration file for fvwm window manager

  • .fvwm2rc - configuration file for fvwm2 window manager

  • .jedrc - configuration file for the jed text editor

  • .lessrc - typically contains key bindings for cursor movement with the less command

  • .login - initialization file when user logs in

  • .logout - commands run when user logs out

  • .wm_style - gives choice of default window manager if one is not specified in startx

  • .Xdefaults - sets up X resources for individual user. The behavior of many different application programs can be changed by modifying this file.

  • .xinitrc - initialization file when running startx. Can be used to activate applications, run a given window manager, and modify the appearance of the root window.

  • .xsession - configuration file for xdm

4  Useful Files


  • /boot/vmlinuz - the typical location and name of the Linux kernel. In the Slackware distribution, the kernel is located at /vmlinuz.

  • /dev/fd0 - first floppy disk drive

  • /dev/fd0H1440 - driver for the first floppy drive in high density mode. Generally, this is invoked when formatting a floppy drive for a particular density. Slackware comes with drivers that allow for formatting a 3.5" diskette with up to 1.7MB of space. Red Hat and Mandrake do not contain these device driver files by default.

  • /dev/fd1 - second floppy disk drive

  • /dev/hda - first IDE hard drive

  • /dev/hdc - on many machines, the IDE cdrom drive. Most often, there is a symbolic link called /dev/cdrom which is just a link to the true cdrom driver file.

  • /dev/null - used when you want to send output into oblivion

  • /etc/aliases - file containing aliases used by sendmail and other MTAs (mail transport agents). After updating this file, it is necessary to run the newaliases utility for the changes to be passed to sendmail.

  • /etc/bashrc - system-wide default functions and aliases for the bash shell

  • /etc/conf.modules - aliases and options for configurable modules

  • /etc/crontab - shell script to run different commands periodically (hourly, daily, weekly, monthly, etc.)

  • /etc/DIR_COLORS - used to store colors for different file types when using ls command. The dircolors command uses this file when there is not a .dir_colors file in the user's home directory. Used in conjunction with the eval command (see below).

  • /etc/exports - specifies hosts to which file systems can be exported using NFS. Man exports contains information on how to set up this file for remote users.

  • /etc/fstab - contains information on partitions and filesystems used by system to mount different partitions and devices on the directory tree

  • /etc/HOSTNAME - stores the name of the host computer

  • /etc/hosts - contains a list of host names and absolute IP addresses.

  • /etc/hosts.allow - hosts allowed (by the tcpd daemon) to access Internet services

  • /etc/hosts.deny - hosts forbidden (by the tcpd daemon) to access Internet services

  • /etc/group - similar to /etc/passwd but for groups

  • /etc/inetd.conf - configures the inetd daemon to tell it what TCP/IP services to provide (which daemons to load at boot time). A good start to securing a Linux box is to turn off these services unless they are necessary.

  • /etc/inittab - runs different programs and processes on startup. This is typically the program which is responsible for, among other things, setting the default runlevel, running the rc.sysinit script contained in /etc/rc.d, setting up virtual login terminals, bringing down the system in an orderly fashion in response to [Ctrl][Alt][Del], running the rc script in /etc/rc.d, and running xdm for a graphical login prompt (only if the default runlevel is set for a graphical login).

  • /etc/issue - pre-login message. This is often overwitten by the /etc/rc.d/rc.S script (in Slackware) or by the /etc/rc.d/rc.local script (in Mandrake and Red Hat, and perhaps other rpm-based distributions). The relevant lines should be commented out (or changed) in these scripts if a custom pre-login message is desired.

  • /etc/lilo.conf - configuration file for lilo boot loader

  • /etc/motd - message of the day file, printed immediately after login. This is often overwritten by /etc/rc.d/rc.S (Slackware) or /etc/rc.d/rc.local (Mandrake/Red Hat) on startup. See the remarks in connection with /etc/issue.

  • /etc/mtab - shows currently mounted devices and partitions and their status

  • /etc/passwd - contains passwords and other information concerning users who are registered to use the system. For obvious security reasons, this is readable only by root. It can be modified by root directly, but it is preferable to use a configuration utility such as passwd to make the changes. A corrupt /etc/passwd file can easily render a Linux box unusable.

  • /etc/printcap - shows the setup of printers

  • /etc/profile - sets system-wide defaults for bash shell. It is this file in Slackware that sets up the DIR_COLORS environment variable for the color ls command. Also sets up other system-wide environment variables.

  • /etc/resolv.conf - contains a list of domain name servers used by the local machine

  • /etc/securetty - contains a list of terminals on which root can login. For security reasons, this should not include dialup terminals.

  • /etc/termcap - ASCII database defining the capabilities and characteristics of different consoles, terminals, and printers

  • /etc/X11/XF86Config - X configuration file. The location in Slackware is /etc/XF86Config.

  • /proc/cpuinfo - cpu information

  • /proc/filesystems - prints filesystems currently in use

  • /proc/interrupts - prints interrupts currently in use

  • /proc/ioports - contains a list of the i/o addresses used by various devices connected to the computer

  • /proc/kcore - The command ls -l /proc/kcore will give the amount of RAM on the computer. It's also possible to use the free command to get the same information (and more).

  • /proc/version - prints Linux version and other info

  • /var/log/messages - used by syslog daemon to store kernel boot-time messages

  • /var/log/lastlog - used by system to store information about last boot

  • /var/log/wtmp - contains binary data indicating login times and duration for each user on system

5  Important Directories

Different distributions have different directory structures, despite attempts at standardization such as the the Linux Filesystem Hierarchy Standard (FHS) organization.

  • /bin - essential UNIX commands such as ls, etc. Should contain all binaries needed to boot the system or run it in single-user mode

  • /boot - files used during booting and possibly the kernel itself are stored here

  • /dev - contains device files for various devices on system

  • /etc - files used by subsystems such as networking, NFS, and mail. Includes tables of disks to mount, processes to run on startup, etc.

  • /etc/profile.d - contains scripts that are run by /etc/profile upon login.

  • /etc/rc.d - contains a number of shell scripts that are run on bootup at different run levels. There is also typically an rc.inet1 script to set up networking (in Slackwar), an rc.modules script to load modular device drivers, and an rc.local script that can be edited to run commands desired by the administrator, along the lines of autoexec.bat in DOS.

  • /etc/rc.d/init.d - contains most of the initialization scripts themselves on an rpm-based system.

  • /etc/rc.d/rc*.d - where ``*'' is a number corresponding to the default run level. Contains files for services to be started and stopped at that run level. On rpm-based systems, these files are symbolic links to the initialization scripts themselves, which are in /etc/rc.d/init.d.

  • /etc/skel - directory containing several example or skeleton initialization shells. Often contains subdirectories and files used to populate a new user's home directory.

  • /etc/X11 - configuration files for the X Window system

  • /home - home directories of individual users

  • /lib - standard shared library files

  • /lib/modules - modular device driver files, most with .o extensions

  • /mnt - typical mount point for many user-mountable devices such as floppy drives, cd-rom readers, etc. Each device is mounted on a subdirectory of /mnt.

  • /proc - virtual file system that provides a number of system statistics

  • /root - home directory for root

  • /sbin - location of binaries used for system administration, configuration, and monitoring

  • /tmp - directory specifically designed for programs and users to store temporary files.

  • /usr - directory containing a number of subdirectory with programs, libraries, documentation, etc.

  • /usr/bin - contains most user commands. Should not contain binaries necessary for booting the system, which go in /bin. The /bin directory is generally located on the same disk partition as /, which is mounted in read-only mode during the boot process. Other filesystems are only mounted at a later stage during startup, so putting binaries essential for boot here is not a good idea.

  • /usr/bin/X11 - most often a symbolic link to /usr/X11R6/bin, which contains executable binaries related to the X Window system

  • /usr/doc - location of miscellaneous documentation, and the main location of program documentation files under Slackware

  • /usr/include - standard location of include files used in C programs such as stdio.h

  • /usr/info - primary location of the GNU info system files

  • /usr/lib - standard library files such as libc.a. Searched by the linker when programs are compiled.

  • /usr/lib/X11 - X Window system distribution

  • /usr/local/bin - yet another place to look for comon executables

  • /usr/man - location of manual page files

  • /usr/sbin - other commands used by superuser for system administration

  • /usr/share - contains subdirectories where many installed programs have configuration, setup and auxiliary files

  • /usr/share/doc - location of program documentation files under Mandrake and Red Hat

  • /usr/src - location of source programs used to build system. Source code for programs of all types are often unpacked in this directory.

  • /usr/src/linux - often a symbolic link to a subdirectory whose name corresponds to the exact version of the Linux kernel that is running. Contains the kernel sources.

  • /var - administrative files such as log files, used by various utilities

  • /var/log/packages - contains files, each of which has detailed information on an installed package in Slackware. The same file can also be found at /var/adm/packages, since the adm subdirectory is a symbolic link to log. Each package file contains a short description plus a list of all installed files.

  • /var/log/scripts - package installation scripts in Slackware are stored here. You can inspect these scripts to see what special features are included in individual packages.

  • /var/spool - temporary storage for files being printed, mail that has not yet been picked up, etc.

6  Important Bash Shell Variables

These variables are most often inherited or declared when a shell is started. A great reference for bash shell variable, bash builtin commands, and bash in general is SSC (2000).

  • HOME - home directory, abbreviated as ~

  • MAIL - name of file that mail is stored in (mailbox)

  • MAILCHECK - sets the frequency at which bash checks for mail

  • PATH - directory paths to search for executable files. According to A Practical Guide to Linux, p.329, the PATH is set in /etc/profile. On my Linux box, /etc/profile adds /usr/X11R6/bin to the path, which means that the path must be set before by another configuration file. The .bash_profile file in my home directory adds /home/ambler/bin to the path. On my Linux box, the first command to set the path would seem to be in /etc/rc.d/rc.sysinit, which is one of the shell scripts invoked by the init process (inittab). Then, /etc/profile adds /usr/X11R6/bin. Finally, .bash_profile adds /home/ambler/bin.

  • PS1 - prompt string. Things that can be put in the prompt string include \h (hostname), \u (username), \w (absolute pathname of working directory), \W (name of working directory w/o path), \d (date), \t (time). See p.331 of A Practical Guide to Linux for more details. On my Red Hat boxes, the primary prompt string is set in the /etc/bashrc file. The prompt is also set in /etc/profile, but the setting in bashrc seems to take precedence. I also have a .bashrc file, which in turn runs /etc/bashrc, which sets the prompt. This means that the same prompt is used by xterm and rxvt in X sessions. On my Slackware box, the command line prompt is set in /etc/profile. The xterm and rxvt prompts are different, since I don't have a .bash_profile file which is run when an xterm is started. In fact, I don't know where the prompt is set in X sessions. It is not set by /usr/X11R6/lib/X11/app-defaults/XTerm.

  • PS2 - secondary prompt string.

7  Important Daemons and Startup Services

These are programs or processes which are run at boot time. Some remain in memory to execute various tasks when required (daemons). Most are started and stopped with scripts in the /etc/rc.d/init.d directory (see above). The exact contents of this directory will depend on which packages from a particular distribution are installed. For example, installing the Apache package will cause an httpd script to be placed in /etc/rc.d/init.d.
There are man pages on most of these. The Red Hat program tksysv (ntsysv is the non graphical version) allows root to automatically configure which of these are started automatically at boot time. The linuxconf program does the same thing, although I haven't tried it. The utility chkconfig is also designed to query and configure runtime services for different runlevels. The www.mandrakeuser.org site has a good page on common services/daemons, especially those included in recent versions of the Mandrake distribution.
A good source of information on daemons and services is the ``Linux Devices, Daemons, Services'' chapter of the CTDP (2000a) document.

  • amd - runs the automount daemon for remote filesystem mounting such as nfs

  • anacron - checks delayed `cron' tasks (see below) at boot time and executes them. Useful if you have cron jobs scheduled but don't run your machine all the time.

  • apmd - Advanced Power Management BIOS daemon. For use on machines, especially laptops, that support apm. Monitors battery status and can shut down the system if power is too low.

  • arpwatch - keeps watch for ethernet IP address pairings that are resolved using the ARP protocol.

  • atd - runs jobs queued by `at'

  • autofs - control the operation of automount daemons, used to mount and unmount devices on demand

  • bootparamd - allows computers to boot from a Linux machine using the BOOTP network protocol. A server process that provides information to diskless clients necessary for booting

  • crond - automatic task scheduler. Manages the execution of tasks that are executed at regular but infrequent intervals, such as rotating log files, cleaning up /tmp directories, etc.

  • cups - daemon for print services under the Common Unix Printer System, a replacement for lpd

  • dhcpd - implements the Dynamic Host Configuration Protocol (DHCP) and the Internet Bootstrap Protocol (BOOTP). Used to lease out IP addresses to remote machines.

  • drakfont - font server in Mandrake

  • fetchmail - daemon to fetch mail at regular intervals from mail servers

  • ftpd - ftp server daemon

  • gated - routing daemon that handles multiple routing protocols and replaces routed and egpup

  • gpm - useful mouse server for applications running on the Linux console.

  • httpd - the Apache webserver hypertext transfer protocol daemon

  • identd - The identd server provides a means to determine the identity of a user of a particular TCP connection. Given a TCP port number pair, it returns a character string which identifies the owner of that connection on the server's system.

  • inetd - listens for service requests on network connections, particularly dial-in services. This daemon can automatically load and unload other daemons (ftpd, telnetd, etc.), thereby economizing on system resources. In the latest version of Red Hat (7.0 at the time of writing), it has been replaced by xinetd. A partial list of services controlled by inetd is listed below. Under many distributions, inetd will execute scripts in the file /etc/inetd.conf.

  • innd - Usenet news server daemon

  • ipchains - daemon for packet forwarding. Used for configuring a gateway/firewall.

  • isdn provides ISDN network interfacing services

  • isdn4linux - for users of ISDN cards

  • kerneld - automatically loads and unloads kernel modules

  • keytable - loads the appropriate keyboard map from /etc/sysconfig/ keyboard

  • kheader -

  • kudzu - detects and configures new or changed hardware during boot

  • linuxconf - ``startup hook'' needed for the linuxconf system configuration tool

  • lpd - line printer and print spooler daemon

  • mcserv - server program for the Midnight Commander networking file system. It provides access to the host file system to clients running the Midnight file system (currently, only the Midnight Commander file manager). If the program is run as root the program will try to get a reserved port otherwise it will use 9876 as the port. If the system has a portmapper running, then the port will be registered with the portmapper and thus clients will automatically connect to the right port. If the system does not have a portmapper, then a port should be manually specified with the -p option (see below).

  • mysql - database server daemon

  • named - provides DNS services

  • netfs - network filesystem mounter. Used for mounting nfs, smb and ncp shares on boot.

  • network -activates all network interfaces at boot time by calling scripts in /etc/sysconfig/network-scripts

  • nfsd - used for exporting nfs shares when requested by remote systems

  • nfslock - starts and stops nfs file locking service

  • numlock - locks numlock key at init runlevel change

  • pcmcia - generic services for pcmcia cards in laptops

  • portmap - needed for Remote Procedure Calls

  • postfix - mail transport agent which is a replacement for sendmail. Now the default on desktop installations of Mandrake.

  • postgresql - database server daemon

  • random - random number generating daemon, related to security and encryption

  • routed - manages routing tables

  • rstatd - kernel statistics server. Allows users on a network to get performance statistics for any connected machine.

  • rusersd - provides services that allow users to find one another over the network

  • rwalld - allows users to use rwall to write messages on remote terminals

  • rwhod - server which maintains the database used by the rwho(1) and ruptime(1) programs. Its operation is predicated on the ability to broadcast messages on a network.

  • sendmail - mail transfer agent. This is the agent that comes with Red Hat. Others, such as smtpd, are not included.

  • smb - needed for running SAMBA

  • snmpd - provides Simple Network Management Protocol support

  • sound - daemon for managing sound

  • squid - web page proxy server daemon

  • syslogd - manages system log files

  • smtpd - Simple Mail Transfer Protocol, designed for the exchange of electronic mail messages. Several daemons that support SMTP are available, including sendmail, smtpd, rsmtpd, qmail, zmail, etc.

  • tcpd - from the tcp_wrappers package. Intercepts requests normally handled by inetd and filters them through the files hosts.allow and hosts.deny files, which can restrict access to services based on type of service, origin of request, destination, etc. Requests are intercepted because calls to particular services are replaced with calls to tcpd in /etc/inetd.conf.

  • telnetd - telnet server daemon

  • usb - daemon for devices on Universal Serial Bus

  • xfs - X font server

  • xinetd - more modern replacement for inetd. It apparently allows for similar kinds of access filters to the ones used by tcpd in conjunction with inetd. xinetd replaces inetd as the default network services daemon in Red Hat 7.0.

  • xntpd - Network Time Protocol daemon. Provides a means to syncronize time over the network.

  • webmin - daemon for webmin web-based system administration program

  • ypbind - NIS binder. Needed if computer is part of Network Information Service domain.

8  Window Managers

The ``Window Managers for X'' site is extremely useful for keeping track of new Linux window managers. See http://winman.org.

  • Afterstep - Based on Fvwm. Designed to give a similar look and feel to the NextStep interface.

  • AnotherLevel - a custom configuration for fvwm2 which mimics the look and feel of Windows95.

  • Blackbox - a light, fast, window manager. It doesn't clutter the screen with too much junk, but it gets the job done efficiently.

  • CDE - Common Desktop Environment. This is the default window manager on many commercial Unix systems. There is no free version.

  • Enlightenment - Very configurable, and probably the coolest looking window manager, but a bit of a resource hog.

  • Flwm - Fast, Light Window Manager. It has very few features, but is very small.

  • Fvwm - F (?) Virtual Window Manager. This, along with Fvwm2, are old standbies in the Linux world. They are quite configurable, but configuration involves editing text files which are sometimes obscure.

  • Fvwm2 - newer version of above.

  • Fvwm95 - implementation of Fvwm2 configured to look and feel like Windows 95.

  • Gnome - Gnome desktop environment. A themable collection of desktop utilities that can be used with different window managers. The current default window manager for a gnome session is Sawfish.

  • Icewm - Ice Window Manager. Very small, very fast, quite configurable. On low memory/small hard drive machines, this one is my favorite. Configuration involves editing text files, but the syntax is extremely easy to understand. There are also a couple of third-party programs available which allow the user to configure Icewm using a graphical interface.

  • KDE - K Desktop Environment. Many of the desktop utilities can be run under different window managers. I may be wrong, but I believe kikbd is the only program out there that allows the user to reconfigure the keyboard layout to different national keyboards on the fly, with one-click switching from one to the other. Unfortunately, this utility is no longer available under KDE 2.x.

  • Kwm - the window manager that comes with the KDE desktop environment.

  • Mwm - Motif window manager.

  • Olwm - Open Look window manager.

  • Sawfish - a small, efficient, configurable window manager that is now the default window manager with Gnome.

  • Twm - Tab window manager.

  • UDE - Unix Desktop Environment. In early development stages. An attempt to create a new type of desktop environment for Unix machines, including Linux.

  • Windowmaker - One of the more popular window managers. Highly configurable and themable.

  • XFce - ``Cholesterol-Free Desktop Environment''. Includes its own window manager, a toolbar, a sound manager, a background manager, and a file manager. It has tearoff menus, up to twelve virtual desktops, etc. It is completely configurable with menus. Its toolbar looks like the one in CDE. I find it easy to use and to configure, and easy on system resources.

9  Alphabetical List of Principal Commands

In the following command list, the distinction between upper case and lower case letters is important. Most of the commands are utilities that are run by invoking their own executable files. In some cases, they are commands which are internal to a shell such as bash (shell builtins). The shell builtins are indicated. There are now many utilities that are included with either the Gnome or the KDE desktop environments, so many that it would be difficult to include them all here. In many cases, they duplicate the functionality of one or more of the programs listed below. I would suggest consulting the online documentation for these packages.
Another good source of information on commands is the CTDP (2000b) document. There are different chapters which group commands in different categories.
On rpm-based systems, to find out which package owns the command foo (where foo is a standalone executable), use the command rpm -q -f foo.

  • a2p - translation utility from awk to Perl

  • a2ps - translation utility from ``any'' to Postscript

  • ac - print statistics concerning user connect time

  • access - determine whether a file can be accessed

  • acroread - Adobe utility for viewing pdf files

  • adduser - used by root to add user to system
    • usage: adduser userid

  • afio - utility to copy or restore files to an archive file. This utility is not part of the basic internal and external programs under Red Hat Linux. It is available as an rpm on the rpmfind.net site.

  • agetty - enables login on terminals. See getty, mgetty, and uugetty.

  • ali - list mail aliases

  • alias - assign name to specified command list. This is actually a shell builtin. On my Red Hat system, I have global alias commands in my /etc/bashrc file and in my  /.bashrc file. On my Slackware box, I have made the rm command a little bit safer with
    • alias rm='rm -i'
    so that you can't recursively delete your /dev directory without telling the system you're sure you want to do it.

  • alien - utility to convert to and from different Linux package formats. Can handle Debian (deb), Stampede (stp), Red Hat (rpm) and Slackware (tgz) packages.

  • apropos - display command names based on keyword search
    • usage: apropos keyword

  • apsfilter - printer filter called by lpd to deal with printing different types of files. This is a fairly sophisticated print filter. It is not set up by default in Slackware. It used to be available on the second cd of a Slackware distribution. Since 4.0, it is available as one of the main packages in the ap set. Read the mail that the installation program sends to the root user. I believe that Red Hat uses its own printer filters.

  • ar - create, modify and extract from archives

  • arch - print machine architecture type

  • as - the portable GNU assembler

  • asapm - AfterStep laptop advanced power management utility

  • ash - a shell, a very simple shell program sometimes used on boot diskettes since it takes up much less space than bash, tcsh, zsh, etc.

  • asload - AfterStep cpu load monitor

  • asmail - AfterStep mail checking utility

  • asmodem - AfterStep utility to monitor modem status

  • aspell - a spell checking program along the lines of ispell

  • aspostit - X Window postit note utility

  • at - executes a shell script at specified time. Use atq to show pending jobs, and atrm to remove jobs from the queue.
    • usage: at time
    • or: at -f file time

  • atq - shows pending jobs queued by at. If run by root, shows everybody's pending jobs.

  • atrm - removes pending jobs queued by at. Use atq to determine the identities of various jobs.
    • usage: atrm job

  • awk - searches for and process patterns in a file

  • banner - print banner to standard output. Syntax is
    • banner [option] [characters]

  • bash - Bourne again shell. This is the default shell in the Red Hat installation.

  • batch - queue, examine, or delete jobs for later execution. See at.

  • bc - a language (compiler) similar to C, with unlimited precision arithmetic

  • bg PID - send process with pid ``PID'' to the background. This is the same as executing [Ctrl]z while interacting with the running process. This is a shell builtin.

  • bh - puts a job in the background. This is a shell builtin.

  • biff - mail notification utility. Notifies user of mail arrival and sender's name.

  • bind - displays or redefines key bindings. This is a shell builtin.

  • bison - parser generator similar to yacc

  • bru - a powerful backup utility program. Commercial. Demonstration versions are often included with Linux distributions such as Red Hat.

  • bsh - equivalent to ash

  • bunzip2 - used to uncompress files compressed with bzip2

  • byacc - parser generator

  • bzip2 - compresses with algorithm different from gzip

  • bzless - view bzipped files

  • c++ - invokes GNU C and C++ compiler

  • cal - displays a 12-month calendar for the given year or a one-month calendar of the given month
    • usage: cal month year

  • cat - combine, copy standard input to standard output. Used to join or display files.

  • cd - change working directory. This is a shell builtin in bash, tcsh and zsh.

  • cdplay - command line utility for playing audio cds

  • cfdisk - similar to fdisk, but menu-driven

  • chat - used to interact with a modem via a chat script

  • chgrp - changes group associated with file. Can be used to change the group associated with subdirectories and files of a directory.
    • usage: chgrp group files
    • or: chgrp -R group files

  • chkconfig - Query or update system services/daemons for different runlevels. Manipulates the various symbolic links in /etc/rc.d. This utility is included with many rpm-based distributions such as RedHat and Mandrake. It is designed to work with System V initialization scripts. Graphical tools for configuring system services include ntsysv, tksysv and ksysv (the latter is a KDE utility).

  • chmod - set permissions (modes) of files or directories. A value of 4 is used for read permission. A value of 2 is used for write permission. A value of 1 is used for execute permission. See umask for default file permissions upon file creation. Chmod can also be used to change the suid bit on files. The syntax for the symbolic version is
    • chmod [options] who operation permission file-list
    The syntax for the absolute version is
    • chmod [options] mode file-list
    To set the uid to the owner's permissions, use
    • chmod u +s file-name
    To set the uid to the group's permissions, use
    • chmod g +s file-name
    There are lots of security issues related to allowing a program to have root's permissions when run by an ordinary user. I don't pretend to understand all of these issues.

  • chown - changes ownership of a file. Can be used recursively.
    • usage: chown userid files
    • or: chown -R userid files

  • chsh - change default shell

  • ci - creates or records changes in an RCS file

  • clear - clear screen command

  • cmp - compares two files for differences
    • usage: cmp file1 file2

  • co - retrieves an unencoded version of an RCS file

  • comm - compares sorted files

  • configure - automatically configures software source code

  • color-xterm - color xterm program. Under Red Hat, this is just a link to xterm-color.

  • control-panel - graphical system configuration tool under Red Hat.

  • cp - copies on or more files. Recursive copying is one simple way of archiving part of a directory structure. Use the command as follows:
    • cp -r /sourcedirectory /targetdirectory

  • cpio - direct copy of files to an output device. Allows creation of archive file spanning multiple diskettes. Allows one directory structure to be mirrored elsewhere on the partition or on another partition. In order to back up an entire directory structure on diskettes, cd to the directory and use the following command:
    • find . -depth -print | cpio -ov > /dev/fd0
    To restore from diskettes, use:
    • cpio -iv < /dev/fd0
    The cpio command will prompt the user to insert more diskettes as they are needed. The command for mirroring a directory structure is the following:
    • find . -depth -print | cpio -pv /destinationdirectory
    This copies the working directory and its contents, including subdirectories, into /destinationdirectory. In order to copy an individual file which is larger than a floppy, use:
    • find . -name nameoffile -print | cpio -iv > /dev/fd0

  • cpkgtool - Slackware tool to install, uninstall and query packages. Front end to installpkg, removepkg, makepkg. This is the graphical version that uses ncurses.

  • cpp - GNU C-compatible compiler preprocessor

  • crontab - schedules command to run at regularly specified time

  • csh - run C shell

  • csplit - separate files into sections. See also split.

  • cvs - manages concurrent acces to files in a hierarchy. Stands for concurrent version system. Is built on RCS. It stores successive revisions of files efficiently and ensures that access to files by multiple developers is done in a controlled manner. Useful when many developers are working on the same project.

  • cut - selects characters or TAB-separated fields from lines of input and writes them to standard output

  • date - displays or sets date and time
    • usage: date
    • or: date date

  • dd - direct copy of file from one device to another. Can be used to make copies of boot or root diskettes for installing Linux. It can be used, for example, to make and exact copy of a floppy disk, as follows. First, place the diskette to be copied in the floppy drive. Then,
    • dd if=/dev/fd0 ibs=512 > floppy.copy
    • Replace the diskette with a fresh diskette.
    • dd if=floppy.copy bs=512 of=/dev/fd0
    The ibs and bs options specify the block sizes for input and for both input and output. A boot disk image can be directly copied to a floppy using the second of the two dd commands above.

  • declare - declares attributes for a variable (same as typeset). This is a shell builtin.

  • df - displays capacity and free capacity on different physical devices such as hard drive partitions and floppy drives that are mounted on the file system. Gives free space in blocks. With the (undocumented) option -h, the program gives free space in Mb or Gb. This is useful for those accustomed to thinking of the capacity of a high-density 3.5 inch diskette as 1440k.

  • diff - displays differences between two files
    • usage: diff file1 file2

  • diff3 - compares three files and reports on differences

  • dip - used to set up a SLIP or PPP connection. It can be used to set up an outgoing SLIP connection or an incoming connection.

  • diplogin - used for setting up incoming dip connections. See the man page for dip.

  • dir - a variation of the GNU ls command that defaults to printing file names in columns

  • dircolors - set colors for GNU ls command. In Slackware, this command is run by the /etc/profile script. Then, whenever xterm is run with the -ls (login shell) option, ls displays different colors for different types of files. Typical usage is eval `dircolors -b`. In Red Hat and Mandrake, I get color directories by aliasing the ls command (see below).

  • display - set display for output of programms under X Windows. Can be used to run a program on a remote machine while displaying the output on a local machine. The remote machine must have permission to send output to the local machine. This is actually an environment variable. See the more detailed discussion in connection with the xhost command below.

  • dmesg - displays messages from /var/log relative to the most recent boot

  • dos - invoke the DOSEMU DOS emulator

  • du - displays information on disk usage. The command
    • du / -bh | less
    will display detailed disk usage for each subdirectory starting at root, giving files sizes in bytes.

  • dumpkeys - print information about the keyboard driver's translation tables to standard output

  • dvilj - send a dvi file to a Laserjet printer. There are specialized versions for individual models of Laserjet printer.

  • dvilj2p - specialized version of dvilj for the IIp series of printers. See above.

  • dvips - send a dvi file to a Postscript printer, to a Postscript capable Laserjet printer, or to a file (with the -o option). There is a switch to print only a subset of the pages, and another switch to print in landscape mode. Use -t landscape, which is one of the arguments to the paper type switch. If you have one page of a document that is a wide table, and you wish to print this in landscape mode, use
    • dvips filename -pp pagenumber -t landscape

  • e2fsck - check an ext2 filesystem. The syntax is
    • e2fsck /dev/devicename
    where the filesystem is on /dev/devicename. The device should not be mounted, and this program must be run as root.

  • echo - write arguments to standard output. One use is to print out information about environment variables, as in
    • echo $PATH - list paths to search
    • echo $HOME or echo ~ - list name of home directory
    This is a shell builtin.

  • editres - a dynamic resource editor for X Toolkit applications. Allows the user to change X resources for individual applications.

  • efax - fax program

  • efix - convert between fax, text, bit-map and gray-scale formats

  • egrep - search files for lines that match regular expressions. Runs faster than grep and fgrep.

  • elm - an interactive mail system

  • elvis - a version of the vi text editor

  • emacs - screen oriented text editor

  • env - desplay the current environment or set a variable equal to a new value

  • eval - scans and evaluates the command line. See dircolors command. This is a shell builtin.

  • ex - interactive command-based editor. The man page lists it as being the same as vim, an improved version of vi.

  • exec - system call which creates a subshell to execute a binary or a script. This is a shell builtin.

  • execve - a variation of the exec command.

  • exit - exit a shell. This is a shell builtin.

  • expand - convert tabs in files to spaces and write to standard output

  • expect - a program that ``talks'' to other interactive programs according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. An interpreted language provides branching and high-level control structures to direct the dialogue. In addition, the user can take control and interact directly when desired, afterward returning control to the script.

  • export - place the value of a variable in the calling environment (makes it global). This is a shell builtin.

  • expr - utility evaluates an expression and displays the result

  • f2c - FORTRAN to C translator

  • f77 - FORTRAN 77 compiler

  • false - null command that returns an unsuccessful exit status

  • fax - simple user interface to efax and efix programs

  • fc - views, edits, and executes commands for the history list. This is a shell builtin.

  • fdformat - low level format of a floppy device

  • fetchmail - retrieve mail from a remote mail server and pass it to local SMTP agents on the local machine

  • fdisk - used to partition hard drives
    • usage: fdisk device

  • fg PID - bring a background or stopped process with pid ``PID'' to the foreground. This is a shell builtin. If only one process is running in background mode, fg with no argument is sufficient to bring it to the foreground

  • fgrep - search for patterns in files

  • file - displays classification of a file or files according to the type of data they contain

  • find - find files according to a large variety of search criteria. The find command that I use the most is
    • find . -name filename -print
    in order to find files matching a particular name on the working directory and all subdirectories. Find can be incredibly powerful, but it is incredibly obscure.

  • finger - display information about a specified userid or userids

  • fmt - simple text formatting utility. Tries to make all nonblank lines nearly the same length.

  • fold - break lines of specified files so they are no wider than a specified lengths

  • fortune - available in the bsdgames package in Slackware and other distributions. Put a call to fortune in /etc/profile and get something inspirational or amusing every time you fire up an xterm as a login shell.

  • free - gives used and free memory on system along with other useful information

  • fromdos - takes a DOS text file from stdin and sends a UNIX file to stdout.

  • fsck - file system check and repair

  • ftp - file transfer over network

  • g++ - C++ compiler

  • g77 - GNU Fortran 77 compiler

  • gawk - GNU awk, mostly for processing delimited text files

  • gcc - invoke C, C++ compiler

  • getipts - parses arguments to a shell script. This is a shell builtin.

  • getkeycodes - print kernel's scancode-to-keycode mapping table

  • ghostscript - set of printing utilities. It seems to be obligatory to have this if a TEX installation such as teTEX is installed. How they communicate with one another is somewhat obscure.

  • ghostview - Aladdin ghostscript interpreter/previewer

  • gimp - image manipulation and paint program

  • glint - Red Hat graphical front end for the rpm package installer and manager.

  • grep - used to find a string within a file. The -i option returns matches without regard to case. The -n option means that each line of output is preceded by file name and line number. The -v option causes non-matched lines to be printed.
    • usage: grep pattern files
    • or: grep -i pattern files
    • or: grep -n pattern files
    • or: grep -v pattern files

  • groupadd - create a new group on the system

  • groups - shows which groups you are in

  • grub - Gnu grand unified bootloader. Can be used instead of lilo to boot multiple operating systems. I encountered a couple of snafus trying to install grub on my home machine after installing Mandrake 8.0 and choosing the lilo bootloader during the initial install. The Mandrake installation program set up /boot/vmlinuz as a symlink to the actual kernel, vmlinuz-2.4.3-20mdk. It took me a while to figure out that grub doesn't understand symbolic links. The documentation suggests installing grub on a diskette using the ``dd'' command. This refused to work, but
    • grub-install '(fd0)'
    did work. The single quotes are necessary. The files necessary to run grub are normally located in /boot/grub. Once the file menu.lst has been edited and appropriated entries added to boot the different operating systems on one's hard disk(s), the following sequence of commands can be used to install grub in the master boot record (MBR) sector of the hard disk:
    • root (hd0,x)
    • setup (hd0)
    Here, the x should be replaced by the partition where the /boot/grub directory is located, which is probably the root partition of the Linux system. Note that grub has its own conventions for naming devices and numbering partitions, so that for example a partition which is called hda6 under Linux will be called (hd0,5) by grub.

  • grub-install - command to install grub on the hard drive (or floppy drive).

  • gunzip - used to uncompress files compressed with gzip

  • gv - PostScript and PDF previewer, based on ghostview

  • gvim - see vi

  • gzexe - compresses executables

  • gzip - used to compress or decompress files

  • halt - shut down system as root, without reboot, immediately

  • hash - remembers the location of commands in the search path. This is a shell builtin.

  • head - displays first part of a file

  • history - command for viewing and manipulating the shell command history list

  • host - look up host names using domain server

  • hostname - used to get or set hostname. Typically, the host name is stored in the file /etc/HOSTNAME.

  • hwclock - used to query and set the hardware clock

  • hylafax - commercial fax program

  • id - display userid and groupid

  • inetd - daemon which starts up other daemons on demand. Configured in /etc/inetd.conf.

  • ifconfig - display (as root) information on network interfaces that are currently active. First ethernet interface should be listed as eth0, second as eth1, etc. First modem ppp connection should be listed as ppp0, etc. The ``lo'' connection is ``loopback'' only.

  • ifdown - shut down the network interface

  • ifup [interface_name] - start up the interface

  • info - display system information. This is the GNU hypertext reader.

  • init - the mother of all processes, run at bootup, executes commands in /etc/inittab. Can be used (with root privileges) to change the system run level.
    • usage: init run_level

  • insmod - used (by root) to install modular device drivers

  • installpkg - Slackware command to install one of the packages from the program sets

  • intr - interrupt key, usually [Ctrl-C]

  • ispell - checks files for spelling errors
    • usage: ispell files

  • jed - programmer's file editor. Behaves like emacs. Has modes for TEX, FORTRAN, C, etc.

  • jobs - displays list of current jobs in the background. This is a shell builtin.

  • joe - simple WordStar-like text editor. It can be invoked in emacs emulation mode with jemacs and in WordStar emulation mode with jstar.

  • jove - Joseph's Own Version of Emacs. A simple emacs clone.

  • kbd_mode - print current keyboard mode

  • kernelcfg - GUI to add/remove kernel modules (as root in X terminal).

  • kerneld - kernel daemon, a process that stays in memory and does all sorts of useful stuff, like automatic loading of device driver modules

  • kikbd - a utility program that comes with KDE that allows users to switch on the fly among different international keyboards. It can be used under different window managers than kfm.

  • kill - sends a signal to (especially to terminate) a job or process. This is a shell builtin in bash, tcsh and zsh.

  • killall - kill processes by name. Kill all processes which are instances of the speciffied program. Also used to send signals to processes or restart them.

  • killall5 - kill all processes except the ones on which it depends

  • last - generate a listing of user logins

  • lastlog - prints the last login times of all users

  • latex - compile a LATEX file

  • ldconfig - creates the necessary links and cache (for use by the run-time linker, ld.so) to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and /lib). Ldconfig checks the header and file names of the libraries it encounters when determining which versions should have their links updated. Ldconfig ignores symbolic links when scanning for libraries.

  • ldd - list the shared libraries on which a given executable depends, and where they are located

  • leave - display reminder at specified time

  • less - Linux alternative to ``more'' command. Displays text files, one screenful at a time. When less pauses, there is a large number of available commands to tell it what to do next. One can scroll both forwards and backwards.

  • let - evaluates a numeric expression. This is a shell builtin.

  • lilo - installs boot loader on the boot sector of a hard drive, of a diskette, or in another location. My 486 has a hard drive that is too large for the machine's BIOS, so I have to boot from a floppy. To create a boot diskette, I do the following (as root):
    • /sbin/fdformat /dev/fd0H1440
    • /sbin/mkfs.ext2 /dev/fd0
    • mount -t ext2 /dev/fd0 /mnt/floppy
    • cp -dp /boot/* /mnt/floppy
    • /sbin/lilo -C /etc/lilo.flop
    The -C option to lilo has lilo use the lilo.flop file instead of the default lilo.conf.

  • linuxconf - interactive tool for configuring Linux system. Uses X if loaded. This is a Gnome tool. It comes with my Red Hat distribution, and is not included with Slackware. It would seem to be the easiest way to configure Linux under Slackware. Version 1.15 is available for Slackware. There is a pretty good introduction to the use of linuxconf in the Red Hat 5.2 installation manual, which is available online at their web site.

  • ln - creates a link to a file. Used to create hard links and, with the -s option, symbolic links which can link files on different disk partitions. The syntax is
    • ln [options] source [dest]

  • locate filename - find the file name which contains the string ``filename''. The syntax is easier than the find command.

  • lock - temporarily lock terminal

  • lockfile - create semaphore file(s), used to limit access to a file

  • - log in to system

  • logname - consult /etc/utmp for user's login name

  • logout - execute logout as individual user and bring up login: prompt

  • look - look for strings in files

  • lpq - show print jobs that are waiting

  • lpr - send file to be printed

  • lprm - cancel a job from print queue

  • ls - list directory contents. To get colored directory listings under Red Hat, Mandrake, etc., use
    • ls -color
    To get this all the time, add
    • alias ls='ls -color=auto'
    to .bashrc. The following command
    • alias ls='ls -Fskb -color=auto'
    will give directory listings in color, with file sizes in kilobytes, and append a character to the file to indicate its type.

  • lsattr - list attributes of files in ext2 file system

  • lsmod - used (by root) to show kernel modules currently loaded

  • lspci - utility to display information on pci buses and hardware devices attached to them. Part of the pciutils package that comes with many Linux distributions.

  • lspnp - utility to display information about pnp devices. Part of the pcmcia or kernel-pcmcia package, depending on the distribution.

  • m4 - an implementation of the traditional UNIX macro processor. It can be used with the sendmail configuration package in Red Hat (and Slackware) to generate a sendmail.conf configuration file without having to edit the configuration file directly.

  • magicfilter - general purpose printer filter. See apsfilter above. apsfilter is the printer filter that comes with the Red Hat and Slackware distributions.

  • mail - sends or reads electronic mail

  • make - keeps a set of programs current. This is a utility that helps when developing a set of programs. It works by executing a script called makefile, Makefile or GNUmakefile in the working directory. It is very often used in combination with configure when compiling and installing noncompiled software packages.

  • makebootdisk - command in Slackware to do just what the name says

  • MAKEDEV - executable script to make device files on /dev

  • makeswap - configures swap space

  • man - displays information from online Unix reference manual

  • manpath - attempt to determine path to manual pages

  • mc - Midnight Commander file manager and visual shell

  • mesg - enables/disables reception of messages

  • minicom - terminal program

  • mkdir - create a directory

  • mkfs - create a file system (format) on a device or partition. Should be invoked after lowlevel formatting of the disk using fdformat. It has several versions which are all links to the basic program, such as mkfs.ext2 and mkfs.msdos.

  • mkswap - creates a Linux swap space on the specified hard disk parition (root privileges neede)
    • usage: mkswap device

  • more - list file contents, stopping after each full screen

  • mount -t [fstype] [device] [mountpoint] - mount device using filesystem of type [fstype] with device name [device] at the location [mountpoint] in the filesystem directory tree

  • mount -a - mount all filesystems according to the specifications in /etc/fstab

  • mouseconfig - mouse configuration utility under Red Hat. Located in /usr/sbin.

  • mpage - print multiple pages per sheet on a Postscript printer. Can also be used to print a page in landscape mode.

  • Mtools - package of MS-DOS utilities. Includes the following commands.
    • mcd - changes working directory on DOS disk
    • mcopy - copies DOS files from one directory to another
    • mdel - deletes DOS files
    • mdir - lists contents of DOS directories
    • mformat - adds DOS formatting information to a disk
    • mtype - displays contents of a DOS file
    The default device for execution of these commands is /dev/fd0 and can be referred to as ``a:''.

  • mv - moves (renames) files

  • netconf - used (as root) to set up network

  • newaliases - rebuilds the /etc/aliases database used by sendmail. Must be rerun every time /etc/aliases is modified for the changes to take effect.

  • newgrp - similar to login. Changes user's identification

  • nice program_name - sets the priority of the program ``program_name''.

  • nm - lists the symbols from object files objfile. If no object files are given as arguments, nm assumes `a.out'.

  • nohup - runs a command that keeps running after logout. The command is in principle immune to hangups, and must have output to a non tty. According to Linux in a Nutshell, this is necessary only in the Bourne shell, since modern shells preserve background processes by default.

  • ntsysv - run level editor under Red Hat. This is the equivalent of tksysv, but does not require a graphical interface.

  • nxterm - color xterm program. The man page for nxterm under Red Hat brings up the same page as xterm.

  • od - dumps contents of a file

  • passwd - change login password

  • paste - joins corresponding lines from files

  • patch - updates source code. Attempts to update a file from a file of change information, or pathces, created by diff.

  • pathchk - determine validity and portability of filenames

  • pdflatex - part of the pdftex program suite. Produces pdf output from a LATEX file.

  • pdftex - produces pdf output from a TeX file. See also pdflatex. This program is part of the tetex 0.9 distribution that is included with Red Hat 5.2 and above, and with Slackware 4.0 and above. It is also available as a separate program.

  • perl - practical extraction and report language

  • pg - display data one screenful at a time

  • pico - simple screen oriented text editor. It is included as part of the Pine program.

  • ping - check if Internet computer is responding. Can also measure the time it takes the queried computer to respond.

  • pkgtool - Slackware tool to install, uninstall and query packages. Front end to installpkg, removepkg, makepkg. The cpkgtool is the ncurses graphical version of this program.

  • popclient - retrieve mail via the Post Office Protocol. Supports POP2 and POP3.

  • popd - pops the top directory of the directory stack and uses cd to change to that directory. This is a shell builtin.

  • pr - paginates files for printing

  • printenv - display list of environment variables

  • printtool - run (as root) in an X terminal to configure your printer(s)

  • ps - displays status of processes. Use the -a option for processes for all users. Use the -x option to include processes not attached to a terminal.

  • pstree - display processes in the form of a tree structure. Killing a parent process will also kill all the children and their descendants.

  • pushd - pushes the argument onto the top of the directory stack and uses cd to change to that directory. This is a shell builtin.

  • pwd - print absolute path of working directory. This is a shell builtin.

  • pwchk - checks the integrity of password and shadow files

  • pwconv - converts passwords to the shadow password format

  • pwunconv - unconverts passwords from the shadow password format. Generates a standard Unix password file.

  • python - interpreted, interactive, object-oriented programming language

  • rcp - copy one or more files to or from remote computer. The syntax is poorly explained in the documentation that I have, including the man pages. Usage is:
    • rcp filename username@remotehost:path
    The user's home directory on the remote system must contain the file .rhosts with a list of users (preceded by the full domain name or exact IP address of their machine) with access privileges.
    • localhostname username

  • rcs - creates or changes the attributes of an RCS file. Stands for Revision Control System.

  • rdev - query/set image root device, swap device, RAM disk size, or video mode in kernel

  • read - reads line from standard input. This is a shell builtin.

  • readonly - declares a variable to be read only. This is a shell builtin.

  • reboot - in Slackware, reboots the system. Seems to be equivalent to shutdown -r now in generic Linux.

  • renice program_name - resets the priority of process ``program_name''.

  • reset - used to reset the screen characteristics. This is useful if the screen gets messed up from, for example, trying to display a binary file in an xterm.

  • return - exits from a function. This is a shell builtin.

  • rlog - prints a summary of the history of an RCS file

  • rlogin - log in to remote computer. The general syntax is as follows, using the UQAM Nobel machine as an example:
    • rlogin -l userid nobel.si.uqam.ca
    The remote computer must recognize the local user and the local machine. See the rcp command for how to set up the .rhosts file on the remote machine.

  • rm - remove files or directories. With the -r (recursive) option (very dangerous!), can be used to remove the contents of a specified directory including all subdirectories.

  • rmail - interpret and handle remote mail received via uucp

  • rmdir - remove empty directories

  • rmmod - used to remove modular device drivers

  • route -n - show routing table. The n option returns numerical addresses rather than names.

  • rpm - invokes the Red Hat package manager in command line mode. I often use this command in query mode to query packages about what files they contain and to find out which package owns a particular file. Examples are
    • rpm -qil foo. Gives package information and a file list for the package foo.
    • rpm -qfil foo. Gives package information and a file list for the package that owns the file foo. Foo must be in the working directory, or the full path to foo must be specified.
    We need to find out about installing the rpm package on a Slackware box. It's probably better to use a package converter such as alien.

  • rpm2tgz - an extremely useful utility on Slackware systems that converts rpm packages to tgz format. They can then be installed using the installpkg command (or pkgtool).

  • rsh - execute shell command on a remote computer. See rcp and rlogin.

  • rstat - summarize host's status: uptime, load averages, and current time

  • ruptime - show host status of local machines

  • rusers - list who is logged on local machines

  • rwall - write to all users over a network

  • rwho - show who is logged in on a LAN. The rwho service must be enabled for this command to run. If it isn't, run ``setup'' as root. I don't understand this last remark, which comes from ``Linux Newbie Administrator Guide''.

  • rxvt - a terminal program similar to xterm, but which has less features and uses less memory

  • sed - edits a file (not interactively). Also a tool for processing text files.

  • set - set or display value of shell variables. This is a shell builtin. The command
    • set | less
    prints the current user environment, giving the values of currently defined variables.

  • setenv - set or display value of environment variables

  • setserial - used by root to configure a serial port

  • setterm - set terminal attributes for a virtual console

  • setuid - set the id of a program when it is run. Used, for example, to give root privileges to a program run by an ordinary user. This is actually done by running the chmod program as root. See the chmod command for the syntax.

  • setup - Slackware program to set up program sets and configure system. Setup devices and file systems, mount root file system

  • sh - standard UNIX shell. On Linux, just another name for bash.

  • shift - promotes each command-line argument. This is a shell builtin.

  • showmount - show information about an nfs server

  • shutdown - reboot or shut down system as root, after specified amount of time. With the -r option, reboot. With the -h option, halt the system.
    • usage: shutdown -r minutes

  • sleep - creates process that sleeps for specified interval

  • sliplogin - attaches a SLIP interface to standard input. Used to allow dialin SLIP connections.

  • sort - sorts and/or merge files

  • split - split file into specified number of segments

  • ssh - secure shell. Apparently has many of the same functionalities as rlogin, telnet, ftp, rsh, etc., with better security and encryption features. We may want to learn how to set this up and use it.

  • startx - front end to xinit in Linux. This is a script which starts up X clients and shuts down the X server on exit from the window manager.

  • startx -- :1 - start the next X window session on the display 1 (the default is opened on display 0). One can switch between different graphical displays using [Ctrl][Alt][F7], [Ctrl][Alt][F8], etc.

  • stty - sets or displays operating options for terminal

  • su - log in as another user, including root

  • sudo - allows individual users to have root permission to perform specified tasks

  • swapoff - disables swap disk

  • swapon - enables swap disk

  • symlinks - provide list of and information about symbolic links

  • sync - writes memory buffers to physical devices

  • systat - query host for system information

  • tac - print file in reverse

  • tail - displays the last part of a file

  • talk - visual communication program that copies lines from one terminal to that of another user

  • tar - file compression and archiving utility. I find the syntax of this command to be frustratingly opaque. The following works for me. To use this command to unzip gzipped tarballs in verbose mode, use
    • tar -xvzf filename.tgz
    To create a tarball from files in a given directory and its subdirectories, use
    • tar -cvzf filename.tgz sourcename
    Sourcename can be the name of a single file, a wildcard such as *, or the name of a subdirectory. There seem to be two different conventions concerning gzipped tarballs. One often encounters .tar.gz. The other popular choice is .tgz. Slackware packages use the latter convention. The command can also be used to archive a file, a group of files, or a directory (with its subdirectories) on tape or onto floppies. If the material to be archived exceeds the capacity of the backup medium, the program will prompt the user to insert a new tape or diskette. Use the following command to back up to floppies:
    • tar -cvf /dev/fd0 filename(s) or directoryname(s)
    The backup can be restored with
    • tar -xvf /dev/fd0
    Tar can be used for other things. To mirror all the files and subdirectories in from-stuff to to-stuff, use the commands
    • cd from-stuff
    • tar cf - . | (cd ../to-stuff; tar xvf -)
    No tar file is ever written to disk. The data is sent by pipe from one tar process to another. This example is taken from Running Linux, p.177. To list the table of contents of a tar archive, use
    • tar tvf tarfile
    To extract individual files from a tar archive, use
    • tar xvf tarfile files
    where files is the list of files to extract. When extracting files, tar creates missing subdirectories underneath the current directory in which the cammand is invoked.

  • tcl - scripting language

  • tcsh - extended version of the C shell

  • tee - copy standard input to standard output and one or more files

  • telinit - used to change run level. Exact run level that corresponds to single-user, multi-user, and X levels depends on distribution.

  • telnet - remote login over network

  • test - evaluates an expression or compares arguments. This is a shell builtin in bash, tcsh and zsh.

  • tftp - user interface to TFTP protocol

  • time - displays times for the current shell and its children. This is a shell builtin. Strange, because there is also a /usr/bin/time program on my Red Hat system.

  • tin - Netnews reader

  • tkdesk - graphical desktop file manager for X

  • tksysv - graphical runlevel editor under Red Hat. Allows root to configure the services that are started at each run level.

  • tload - display system load average in graph format

  • top - dynamically displays process status

  • touch - update access and modification times of a file. If the file does not exist on disk, an empty file is created.

  • tr - translation utility that can be used, for example, to replace specified characters in a text file

  • trap - traps a signal. This is a shell builtin.

  • true - null command that returns a successful exit status

  • tset - initializes terminal

  • tty - shows special file that represents your terminal. Displays the terminal pathname.

  • type - displays how each argument would be interpreted as a command. This is a shell builtin.

  • typeset - declares attributes for a variaable (same as declare). This is a shell builtin.

  • ul - translate underscores to underlining

  • umask - establishes the file-creation permissions mask. Usage is
    • umask xyz
    The system subtracts x, y and z from the owner, group and other file permissions that it would otherwise assign to new files. This is a shell builtin.

  • umount [device] - finish writing to the device and remove it from the active filesystem. The command umount -a will (re)mount all file systems listed in /etc/fstab.

  • unalias - remove name previously defined by alias. This is a shell builtin.

  • uname - displays information about the system. With no arguments, it displays the name of the operating system. With the -a option, it displays information about the operating system, the host name, and hardware.

  • uniq - displays lines of a file that are unique

  • unset - removes a variable or function. This is a shell builtin.

  • unzip - uncompress files compressed with the zip utility, compatible with DOS PKzip

  • updatedb - update file database used by locate command

  • uptime - shows the time, how long the system has been up, the number of users, and average load.

  • useradd - same as adduser

  • userdel - remove an account (as root). The user's home directory and undelivered mail must be dealt with separately.

  • users - prints list of users on the system

  • vdir - variant of the GNU version of the ls command. Defaults to printing out the long version of directory entries.

  • vi - standard screen oriented Unix editor

  • view - vi in read-only mode

  • vim - improved vi editor

  • vrfy - query remote host to verify the accuracy of an email address

  • w - display info about userids and active processes

  • wait - waits for a background process to terminate. This is a shell builtin.

  • wc - displays number of lines, characters and words in a file

  • Wharf - the AfterStep application dock module

  • whatis - display one-line summary of specified command

  • whereis - use to find utilities in standard locations

  • which - used to find utilities in search path. Will return the absolute directory path of the named utility program.

  • who - display information about currently logged in userids

  • whoami - display information about userid that is currently logged in

  • wish - front end to tk, an X window extension of tcl

  • workbone - console based cd player

  • workman - graphical cd player program

  • write - send messages to another local user

  • X - starts up the X server. Can be invoked with
    • X -quiet -query remotemachineaddress
    in order to get a graphical login screen on the remote machine. See the discussion in connection with xdm below.

  • xadm - display advanced power management BIOS information

  • xargs - converts standard output of one command into arguments for another. This is one of those powerful but obscure commands. Xargs reads arguments from the standard input, delimited by blanks (which can be protected with double or single quotes or a backslash) or newlines, and executes the command (default is /bin/echo) one or more times with any initial-arguments followed by arguments read from standard input. Blank lines on the standard input are ignored.

  • xbiff - graphical mail delivery notification utility

  • xcalc - simple calculator program

  • xclipboard - name says it all

  • Xconfigurator - Red Hat utility for configuring settings for X

  • xdm - used to start an X login session. This can be used to start a login session on a remote system. See the discussion on the following site:
    See the man pages for X, xdm, and Xserver. As usual, the man pages are pretty obscure. The best single source seems to be the Xserver man pages. After X is configured, X needs to be started at bootup with the command (in /etc/rc.d/init.d/xterm):
    • X -quiet -query remotemachineaddress
    If the address of a nameserver is not configured, then the numeric address of the remote machine rather than its name should be entered. If the machines are connected through ethernet cards and the net, then obviously basic networking has to be set up. Gnome and KDE come with their own versions of X display/login managers, called respectively gdm and kdm.

  • xdvi - view a dvi file compiled under LATEX

  • xedit - a simple text editor for X

  • xf86config - graphical configuration tool for X

  • XF86Setup - graphical configuration tool for X

  • xfd - display an available font in X. Creates a grid in an x-term with one character per rectangle.

  • xfig - utility for interactive generation of figures

  • xfm - graphical file manager for X

  • xhost - tell X server that remote computer has access to your machine and that you will use the remote computer. This can be used to set up remote X sessions. To set up a remote X session on the UQAM Nobel machine, run the following command on the local machine (one doesn't have to be root to do this)
    • xhost +nobel.si.uqam.ca
    Then, log onto the remote machine using rlogin (see above) or telnet. Once logged in, use the following command to get the remote X server to open an X terminal on the local machine:
    • setenv DISPLAY localhostname:0 ; xterm &
    This is valid for csh, which is the default login shell on Nobel. For ksh, (and I think bash) replace with
    • DISPLAY=localhostname:0
    • export DISPLAY ; xterm
    Other X-based programs such as Netscape or Gauss (graphical version) can also be run on a remote machine with display on the local machine with little trouble. The local X server is the program that has all of the information concerning the properties of the graphics card and terminal, so it must be necessary to have X running on the local machine. The following should also work. After using xhost to give permission to the remote machine to display on the local machine, use
    • netscape -display localhostname:0.0
    Question: can one start the X session on the local machine and then run a remote copy of a window manager?

  • xinit - start X Window. The command startx is a front end to xinit in Linux, including Slackware.

  • xload - displays a graphic of the system load

  • xlpq - graphical interface to print manager. This is included on one of the XFCE menus, but does not seem to be a part of the base Red Hat distribution.

  • xlsfonts - list fonts available under the X Window system.

  • xman - browsable command reference. Displays manual pages under X.

  • xmh - graphical front end under X to the nmh mail handling system. This program is part of the XFree86 package in Red Hat.

  • xmodmap - utility for modifying keymaps and pointer button mappings in X. Can be used to install a French Canadian keyboard. Download the Xmodmap.cf file from www.linux-quebec.org, and insert the command
    • xmodmap /etc/X11/Xmodmap.cf &
    into the .xession (with xdm) or the .xinitrc (with startx) file.

  • xosview - displays bar graphs of system load, load average, memory usage, and swap usage

  • xpaint - simple paint program for X

  • xpdf - GPL'd utility for previewing dvi files. Doesn't seem to work too well on texts with a lot of math.

  • xplaycd - X Window audio cd player utility

  • xsetroot - utility to configure root window of an X terminal

  • xsysinfo - graphical display of load and memory usage

  • xterm - start an X Window terminal session

  • xterm-color - color version of xterm

  • xv - utility for viewing and manipulating many types of image files. This is a shareware program.

  • xvidtune - utility for fine tuning of monitor settings under X

  • yacc - parser generator

  • ytalk - multi-user program similar to talk

  • zcat - read one or more files that have been compressed with gzip or compress and write to standard output

  • zcmp - read compressed files and pass them to cmp

  • zdiff - read compressed files and pass them to diff

  • zgrep - read compressed files and pass them to grep

  • Zharf - AfterStep button panel module

  • zip - zip utility compatible with DOS PKzip

  • zless - view zipped files

  • zmore - print contents of compressed files one screen at a time

  • znew - uncompress Z files and recompress in .gz format

Eventually, we want to be able to distinguish between commands that are an intrinsic part of the kernel, commands that are executable binaries that come with every distribution of Linux, executable binaries that are not provided with all distributiions of Linux, and executable shell scripts. We also want to point out the typical location of these commands on different Linux distributions. Finally, we want to distinguish between shell commands and Linux commands.

10  Notes on Applications


10.1  Mail Transfer Agents (MTAs)

The Linux distributions I know come with sendmail, except for Mandrake, which as of version 7.1 uses Postfix as its default MTA. There are several competing programs available. Even the simplest don't seem to be that easy to configure.

  • Exim -

  • Fetchmail - seemingly one of the few ways (Pine is able to do this as well) to download mail automatically from a POP or IMAP server and pass it to local mail handling agents. Use the following line in  /.fetchmailrc:
    • poll pop.uqam.ca proto pop3 user USERNAME pass PASSWORD
    Use the following to have fetchmail loaded as a daemon that will download mail at regular intervals:
    • fetchmail -d 6000
    The interval is specified in seconds. Fetchmail will poll all of the pop servers listed in  /.fetchmailrc.

  • Getmail - Designed as a replacement for Fetchmail.

  • MMDF -

  • Postfix - a mail transport agent and potential replacement for sendmail. Mandrake 7.1 and up uses this as its default MTA.

  • Qmail - a ``modern'' replacement for sendmail. It is reputed to be more secure than sendmail. Since it doesn't have a GPL license, it is not the default MTA of any Linux distributions that I know of.

  • Sendmail - this one gets my vote for the most complicated and obscure configuration file, /etc/sendmail.cf. Most individual Linux users will be using machines connected to the Internet via an ISP or on networks (such as university networks) with centralized mail processing and access to the net. I have to change the following lines in sendmail.cf to be able to send mail with emacs.
    • DMuqam.ca # masquerade the domain name
    • DNambler.steven # masquerade username
    • DSnobel.si.uqam.ca # relay all mail through nobel server
    The problem comes from the fact that, as a user on a local network, I don't have my own domain name. I want return mail to be routed to UQAM's mail server and I want the server to handle all my mail for me, even mail to other UQAM users. If I send mail to UQAM users using their normalized usernames, the net does not know who or where they are. I have managed to get a configuration that works by writing a sendmail.mc file and processing it with the m4 macro interpreter, following the Address-Rewriting mini-HOWTO. I now have something that works, but which mysteriously complains about ``dangerous write permissions'' every time the system boots up.

  • Smail - seems to be a popular choice on smaller systems. It would appear that at one point in its history, Red Hat shipped with smail, but this has been replaced with sendmail.

  • Zmailer - apparently designed for mail servers with a large number of users.

10.2  Mail User Agents (MUAs)


  • Acmemail - Web-based mail agent. Allows you to access your mail with any browser. Involves setting up a Perl CGI script on the server side.

  • Archimedes - A successor program to XFmail (see below)

  • Arrow -

  • Balsa - the default Gnome mail program

  • Blitzmail -

  • Elm -

  • Emumail - Web-based mail agent. Allows you to use any browser to check your POP mail account. The Web site of the company that makes this one can be used to check your mail on a Unix system without setting up any CGI script on the server side.

  • Evolution - mail reader and contact manager/calendar designed for use under Gnome

  • Exmh - graphical front end for Mh

  • Kmail - mail reading program included with KDE

  • M - for ``Mahogany''. Seems similar to XFmail (see below). I haven't been able to figure out from the description whether it runs independently of or in conjunction with sendmail and procmail.

  • Mh -

  • Mumail -

  • Mutt - text based mail program, which is highly configurable.

  • Nmh - mail handling system. This system includes a large number of binary commands that are kept in /usr/bin. See the man page for nmh for details. Red Hat 5.1 and 5.2 come with exmh and xmh, which are graphical front ends for nmh. The exmh front end is a separate package, while xmh is owned by XFree86.

  • Pine - text based mail and news utility. Features now include:
    • MIME support
    • ability to read and post network news
    • maintenance of an address book of mail recipients
    • spell checking during message composition
    • mouse support when using xterm on an X Window system
    • a highly configurable environment
    Pine can be used to download mail from one or more POP3 mail servers. See Tip of the Week (http://tipoftheweek.darkelf.net) for the fourth week of February 1999. First, set up multiple configuration files (pine -p localmail, pine -p popserver 1, pine -p popserver 2, etc.). Then, to configure Pine to use a POP3 server, use the Setup Config command. Set something like this in the inbox-path:
    • {pop.server.com/pop3/user=myid}INBOX
    When Pine is restarted, it should ask for your password, connect to the remote server, and use it is if it were accessing local mail. The article is unclear on whether there is the option of leaving copies of the downloaded mail on the server.

  • Sylpheed -

  • XCmail -

  • XFmail - This one seems very promising. It's a GUI-based mail tool that seems to offer most of the features of Netscape's mail module. It runs without using sendmail and procmail, which is a major advantage.

10.3  Editors


  • cooledit - a pretty powerful GUI text editor

  • emacs - powerful text editor that includes modules for reading and sending mail and postings to newsgroups, and a browser module. For editing TEX and LATEX files, the AucTEX addon package is invaluable, and makes emacs pretty hard to beat as an editor with LATEX.

  • jed - has pretty good emacs emulation (it can even read mail like emacs!). It does simple syntax highlighting for TeX files, including giving positioning of parentheses. It would seem to be pretty configurable and takes up much less disk space than emacs, although more than joe and muemacs. It works well in console mode, and still manages to use colors for menu bars and syntax highlighting. The program xjed which comes with some versions starts up its own X terminal when invoked.

  • joe - "Joe's Own Editor", a fairly powerful editor with a compact binary and an ability to emulate Wordstar, Emacs, Pico, and a few other editors.

  • jove - "Joe's Own Version of Emacs". I tried this out a couple of times and managed to crash it when making some minor errors in command syntax.

  • microemacs (JASSPA) - spinoff of muemacs. Pretty powerful and configurable, while not taking up too much disk space or memory.

  • muemacs - a fairly powerful emacs clone whose binary is actually smaller than that of the Joe editor.

  • nedit - an X Window based text editor. Of all text editors for Linux that I've seen, it has commands which are closest to Windows text editors, for cursor movement, highlighting, marking text, etc. It has very good syntax highlighting for both LATEX and HTML.

  • pico - simple text editor. It often comes packaged with the Pine mail user agent.

  • vi - included with most Linux distributions. If you're not used to the syntax, it can be pretty hard to understand.

  • vim - improved version of vi

  • xedit - simple text editor included with many Linux distributions

10.4  Other


  • dfm - Desktop File Manager. Allows the user to place program icons on the desktop.

  • gmc - Gnome Midnight Commander. Gnome version of Midnight Commander. Includes a graphical interface and allows the user to place icons on the desktop.

  • mc - Midnight Commander file manager. Runs in console mode and in an xterm.

  • scilab - a free matrix programming language. May be a good substitute for GAUSS and/or MATLAB.

11  Some Nifty Slogans

Linux: the choice of a GNU generation.
Windows: where do you want to go today? Linux: where do you want to go tomorrow?
This program has performed an illegal operation and will be shut down: please reboot using Linux.
``When you say `I wrote a program that crashed Windows', people just stare at you blankly and say `Hey, I got those with the system, for free'.'' - Linus Torvalds
Windows 2000, from the company that brought you EDLIN!
Linux: because rebooting is for adding new hardware.
Your mouse has moved. Windows NT must be restarted for the change to take effect. Reboot now [OK]?
Linux: transforms your microcomputer into a workstation. Windows NT: transforms your workstation into a microcomputer.

12  References

Computer Technology Documentation Project (CTDP) (2000a), ``How Linux Works'', http://ctdp.tripod.com/os/linux/howlinuxworks/index.html
Computer Technology Documentation Project (CTDP) (2000b), ``Linux Files and Command Reference'',http://ctdp.tripod.com/os/linux/commands/index.html
Klimas, Piotr et. al. (1999), ``Linux Newbie Administrator Guide'', http://sunsite.dk/linux-newbie/
Siever, Ellen, Stephen Spainhour, Jessica P. Hekman, and Stephen Figgins (2000), Linux in a Nutshell. third edition, O'Reilly
Sobell, Mark G. (1998), A Practical Guide to Linux. Addison-Wesley
SSC (2000), ``Bash Reference Card'', http://www.ssc.com/ssc/bash/ bash.pdf
Welsh, Matt, Matthias Kalle Dalheimer and Lar Kaufman (1999), Running Linux. third edition, O'Reilly and Associates

IP6 Next Generation Overview


1. Introduction

This paper presents an overview of the Next Generation Internet Protocol (IPng). IPng was recommended by the IPng Area Directors of the Internet Engineering Task Force at the Toronto IETF meeting on July 25, 1994, and documented in RFC 1752, "The Recommendation for the IP Next Generation Protocol" [1]. The recommendation was approved by the Internet Engineering Steering Group on November 17, 1994 and made a Proposed Standard.
The formal name of this protocol is IPv6 (where the "6" refers to it being assigned version number 6). The current version of the Internet Protocol is version 4 (referred to as IPv4). This overview is intended to give the reader an overview of the IPng protocol. For more detailed information the reader should consult the documents listed in the reference section.
IPng is a new version of IP which is designed to be an evolutionary step from IPv4. It is a natural increment to IPv4. It can be installed as a normal software upgrade in internet devices and is interoperable with the current IPv4. Its deployment strategy was designed to not have any "flag" days. IPng is designed to run well on high performance networks (e.g., ATM) and at the same time is still efficient for low bandwidth networks (e.g., wireless). In addition, it provides a platform for new internet functionality that will be required in the near future.
This paper describes the work of IETF IPng working group. Several individuals deserve specific recognition. These include Paul Francis, Bob Gilligan, Dave Crocker, Ran Atkinson, Jim Bound, Ross Callon, Bill Fink, Ramesh Govindan, Christian Huitema, Erik Nordmark, Tony Li, Dave Katz, Yakov Rekhter, Bill Simpson, and Sue Thompson.

2.0 Key Issues

There are several key issues that should be considered when reviewing the design of the next generation internet protocol. Some are very straightforward. For example the new protocol must be able to support large global internetworks. Others are less obvious. There must be a clear way to transition the current large installed base of IPv4 systems. It doesn't matter how good a new protocol is if there isn't a practical way to transition the current operational systems running IPv4 to the new protocol.

2.1 Growth

Growth is the basic issue which caused there to be a need for a next generation IP. If anything is to be learned from our experience with IPv4 it is that the addressing and routing must be capable of handling reasonable scenarios of future growth. It is important that we have an understanding of the past growth and where the future growth will come from.
Currently IPv4 serves what could be called the computer market. The computer market has been the driver of the growth of the Internet. It comprises the current Internet and countless other smaller internets which are not connected to the Internet. Its focus is to connect computers together in the large business, government, and university education markets. This market has been growing at an exponential rate. One measure of this is that the number of networks in current Internet (40,073 as of 10/4/94) is doubling approximately every 12 months. The computers which are used at the endpoints of internet communications range from PC's to Supercomputers. Most are attached to Local Area Networks (LANs) and the vast majority are not mobile.
The next phase of growth will probably not be driven by the computer market. While the computer market will continue to grow at significant rates due to expansion into other areas such as schools (elementary through high school) and small businesses, it is doubtful it will continue to grow at an exponential rate. What is likely to happen is that other kinds of markets will develop. These markets will fall into several areas. They all have the characteristic that they are extremely large. They also bring with them a new set of requirements which were not as evident in the early stages of IPv4 deployment. The new markets are also likely to happen in parallel with one another. It may turn out that we will look back on the last ten years of Internet growth as the time when the Internet was small and only doubling every year. The challenge for an IPng is to provide a solution which solves todays problems and is attractive in these emerging markets.
Nomadic personal computing devices seem certain to become ubiquitous as their prices drop and their capabilities increase. A key capability is that they will be networked. Unlike the majority of todays networked computers they will support a variety of types of network attachments. When disconnected they will use RF wireless networks, when used in networked facilities they will use infrared attachment, and when docked they will use physical wires. This makes them an ideal candidate for internetworking technology as they will need a common protocol which can work over a variety of physical networks. These types of devices will become consumer devices and will replace the current generation of cellular phones, pagers, and personal digital assistants. In addition to the obvious requirement of an internet protocol which can support large scale routing and addressing, they will require an internet protocol which imposes a low overhead and supports auto configuration and mobility as a basic element. The nature of nomadic computing requires an internet protocol to have built in authentication and confidentiality. It also goes without saying that these devices will need to communicate with the current generation of computers. The requirement for low overhead comes from the wireless media. Unlike LAN's which will be very high speed, the wireless media will be several orders of magnitude slower due to constraints on available frequencies, spectrum allocation, error rates, and power consumption.
Another market is networked entertainment. The first signs of this emerging market are the proposals being discussed for 500 channels of television, video on demand, etc. This is clearly a consumer market. The possibility is that every television set will become an Internet host. As the world of digital high definition television approaches, the differences between a computer and a television will diminish. As in the previous market, this market will require an Internet protocol which supports large scale routing and addressing, and auto configuration. This market also requires a protocol suite which imposes the minimum overhead to get the job done. Cost will be the major factor in the selection of an appropriate technology.
Another market which could use the next generation IP is device control. This consists of the control of everyday devices such as lighting equipment, heating and cooling equipment, motors, and other types of equipment which are currently controlled via analog switches and in aggregate consume considerable amounts of electrical power. The size of this market is enormous and requires solutions which are simple, robust, easy to use, and very low cost. The potential pay-back is that networked control of devices will result in cost savings which are extremely large.
The challenge the IETF faced in the selection of an IPng is to pick a protocol which meets today's requirements and also matches the requirements of these emerging markets. These markets will happen with or without an IETF IPng. If the IETF IPng is a good match for these new markets it is likely to be used. If not, these markets will develop something else. They will not wait for an IETF solution. If this should happen it is probable that because of the size and scale of the new markets the IETF protocol would be supplanted. If the IETF IPng is not appropriate for use in these markets, it is also probable that they will each develop their own protocols, perhaps proprietary. These new protocols would not interoperate with each other. The opportunity for the IETF is to select an IPng which has a reasonable chance to be used in these emerging markets. This would have the very desirable outcome of creating an immense, interoperable, world- wide information infrastructure created with open protocols. The alternative is a world of disjoint networks with protocols controlled by individual vendors.

2.2 Transition

At some point in the next three to seven years the Internet will require a deployed new version of the Internet protocol. Two factors are driving this: routing and addressing. Global internet routing based on the on 32-bit addresses of IPv4 is becoming increasingly strained. IPv4 address do not provide enough flexibility to construct efficient hierarchies which can be aggregated. The deployment of Classless Inter- Domain Routing [2] is extending the life time of IPv4 routing by a number of years, the effort to manage the routing will continue to increase. Even if the IPv4 routing can be scaled to support a full IPv4 Internet, the Internet will eventually run out of network numbers. There is no question that an IPng is needed, but only a question of when.
The challenge for an IPng is for its transition to be complete before IPv4 routing and addressing break. The transition will be much easier if IPv4 addresses are still globally unique. The two transition requirements which are the most important are flexibility of deployment and the ability for IPv4 hosts to communicate with IPng hosts. There will be IPng- only hosts, just as there will be IPv4-only hosts. The capability must exist for IPng-only hosts to communicate with IPv4-only hosts globally while IPv4 addresses are globally unique.
The deployment strategy for an IPng must be as flexible as possible. The Internet is too large for any kind of controlled roll out to be successful. The importance of flexibility in an IPng and the need for interoperability between IPv4 and IPng was well stated in a message to the sipp mailing list by Bill Fink, who is responsible for a portion of NASA's operational internet. In his message he said:
"Being a network manager and thereby representing the interests of a significant number of users, from my perspective it's safe to say that the transition and interoperation aspects of any IPng is *the* key first element, without which any other significant advantages won't be able to be integrated into the user's network environment. I also don't think it wise to think of the transition as just a painful phase we'll have to endure en route to a pure IPng environment, since the transition/coexistence period undoubtedly will last at least a decade and may very well continue for the entire lifetime of IPng, until it's replaced with IPngng and a new transition. I might wish it was otherwise but I fear they are facts of life given the immense installed base.
"Given this situation, and the reality that it won't be feasible to coordinate all the infrastructure changes even at the national and regional levels, it is imperative that the transition capabilities support the ability to deploy the IPng in the piecemeal fashion... with no requirement to need to coordinate local changes with other changes elsewhere in the Internet...
"I realize that support for the transition and coexistence capabilities may be a major part of the IPng effort and may cause some headaches for the designers and developers, but I think it is a duty that can't be shirked and the necessary price that must be paid to provide as seamless an environment as possible to the end user and his basic network services such as e-mail, ftp, gopher, X-Window clients, etc...
"The bottom line for me is that we must have interoperability during the extended transition period for the base IPv4 functionality..."
Another way to think about the requirement for compatibility with IPv4 is to look at other product areas. In the product world, backwards compatibility is very important. Vendors who do not provide backward compatibility for their customers usually find they do not have many customers left. For example, chip makers put considerable effort into making sure that new versions of their processor always run all of the software that ran on the previous model. It is unlikely that Intel would develop a new processor in the X86 family that did not run DOS and the tens of thousands of applications which run on the current versions of X86's.
Operating system vendors go to great lengths to make sure new versions of their operating systems are binary compatible with their old version. For example the labels on most PC or MAC software usually indicate that they require OS version XX or greater. It would be foolish for Microsoft come out with a new version of Windows which did not run the applications which ran on the previous version. Microsoft even provides the ability for windows applications to run on their new OS NT. This is an important feature. They understand that it was very important to make sure that the applications which run on Windows also run on NT.
The same requirement is also true for IPng. The Internet has a large installed base. Features need to be designed into an IPng to make the transition as easy as possible. As with processors and operating systems, it must be backwards compatible with IPv4. Other protocols have tried to replace TCP/IP, for example XTP and OSI. One element in their failure to reach widespread acceptance was that neither had any transition strategy other than running in parallel (sometimes called dual stack). New features alone are not adequate to motivate users to deploy new protocols. IPng must have a great transition strategy and new features.

3.0 History of the IPng Effort

The IPng protocol represents the evolution of many different IETF proposals and working groups focused on developing an IPng. It represents over three years of effort focused on this topic. A brief history follows:
By the Winter of 1992 the Internet community had developed four separate proposals for IPng. These were "CNAT", "IP Encaps", "Nimrod", and "Simple CLNP". By December 1992 three more proposals followed; "The P Internet Protocol" (PIP), "The Simple Internet Protocol" (SIP) and "TP/IX". In the Spring of 1992 the "Simple CLNP" evolved into "TCP and UDP with Bigger Addresses" (TUBA) and "IP Encaps" evolved into "IP Address Encapsulation" (IPAE).
By the fall of 1993, IPAE merged with SIP while still maintaining the name SIP. This group later merged with PIP and the resulting working group called themselves "Simple Internet Protocol Plus" (SIPP). At about the same time the TP/IX Working Group changed its name to "Common Architecture for the Internet" (CATNIP).
The IPng area directors made a recommendation for an IPng in July of 1994. This recommendation, from [1], includes the following elements:
  • Current address assignment policies are adequate.
  • There is no current need to reclaim underutilized assigned network numbers.
  • There is no current need to renumber major portions of the Internet.
  • CIDR-style assignments of parts of unassigned Class A address space should be considered.
  • "Simple Internet Protocol Plus (SIPP) Spec. (128 bit ver)" [3] be adopted as the basis for IPng.
  • The documents listed in Appendix C be the foundation of the IPng effort.
  • An IPng Working Group be formed, chaired by Steve Deering and Ross Callon.
  • Robert Hinden be the document editor for the IPng effort.
  • An IPng Reviewer be appointed and that Dave Clark be the reviewer.
  • An Address Autoconfiguration Working Group be formed, chaired by Dave Katz and Sue Thomson.
  • An IPng Transition Working Group be formed, chaired by Bob Gilligan and TBA.
  • The Transition and Coexistence Including Testing Working Group be chartered.
  • Recommendations about the use of non-IPv6 addresses in IPv6 environments and IPv6 addresses in non-IPv6 environments be developed.
  • The IESG commission a review of all IETF standards documents for IPng implications.
  • The IESG task current IETF working groups to take IPng into account.
  • The IESG charter new working groups where needed to revise old standards documents.
  • Informational RFCs be solicited or developed describing a few specific IPng APIs.
  • The IPng Area and Area Directorate continue until main documents are offered as Proposed Standards in late 1994.
  • Support for the Authentication Header be required.
  • Support for a specific authentication algorithm be required.
  • Support for the Privacy Header be required.
  • Support for a specific privacy algorithm be required.
  • An "IPng framework for firewalls" be developed.

4.0 IPng Overview

IPng is a new version of the Internet Protocol, designed as a successor to IP version 4 [4]. IPng is assigned IP version number 6 and is formally called IPv6 [5].
IPng was designed to take an evolutionary step from IPv4. It was not a design goal to take a radical step away from IPv4. Functions which work in IPv4 were kept in IPng. Functions which didn't work were removed. The changes from IPv4 to IPng fall primarily into the following categories:
  • Expanded Routing and Addressing CapabilitiesIPng increases the IP address size from 32 bits to 128 bits, to support more levels of addressing hierarchy and a much greater number of addressable nodes, and simpler auto-configuration of addresses.
    The scalability of multicast routing is improved by adding a "scope" field to multicast addresses.
  • A new type of address called a "anycast address" is defined, to identify sets of nodes where a packet sent to an anycast address is delivered to one of the nodes. The use of anycast addresses in the IPng source route allows nodes to control the path which their traffic flows.
  • Header Format SimplificationSome IPv4 header fields have been dropped or made optional, to reduce the common-case processing cost of packet handling and to keep the bandwidth cost of the IPng header as low as possible despite the increased size of the addresses. Even though the IPng addresses are four time longer than the IPv4 addresses, the IPng header is only twice the size of the IPv4 header.
  • Improved Support for OptionsChanges in the way IP header options are encoded allows for more efficient forwarding, less stringent limits on the length of options, and greater flexibility for introducing new options in the future.
  • Quality-of-Service CapabilitiesA new capability is added to enable the labeling of packets belonging to particular traffic "flows" for which the sender requests special handling, such as non-default quality of service or "real- time" service.
  • Authentication and Privacy CapabilitiesIPng includes the definition of extensions which provide support for authentication, data integrity, and confidentiality. This is included as a basic element of IPng and will be included in all implementations.
The IPng protocol consists of two parts, the basic IPng header and IPng extension headers.

5.0 IPng Header Format

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version| Prior |                       Flow Label              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Payload Length        |  Next Header  |   Hop Limit   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                         Source Address                        +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                      Destination Address                      +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Ver
4-bit Internet Protocol version number = 6.
Prio
4-bit Priority value. See IPng Priority section.
Flow Label
24-bit field. See IPng Quality of Service section.
Payload Length
16-bit unsigned integer. Length of payload, i.e., the rest of the packet following the IPng header, in octets.
Next Hdr
8-bit selector. Identifies the type of header immediately following the IPng header. Uses the same values as the IPv4 Protocol field [6].
Hop Limit
8-bit unsigned integer. Decremented by 1 by each node that forwards the packet. The packet is discarded if Hop Limit is decremented to zero.
Source Address
128 bits. The address of the initial sender of the packet. See [7] for details.
Destination Address
128 bits. The address of the intended recipient of the packet (possibly not the ultimate recipient, if an optional Routing Header is present).

6.0 IPng Extensions

IPng includes an improved option mechanism over IPv4. IPng options are placed in separate extension headers that are located between the IPng header and the transport-layer header in a packet. Most IPng extension headers are not examined or processed by any router along a packet's delivery path until it arrives at its final destination. This facilitates a major improvement in router performance for packets containing options. In IPv4 the presence of any options requires the router to examine all options.
The other improvement is that unlike IPv4 options, IPng extension headers can be of arbitrary length and the total amount of options carried in a packet is not limited to 40 bytes. This feature plus the manner in which they are processed, permits IPng options to be used for functions which were not practical in IPv4. A good example of this is the IPng Authentication and Security Encapsulation options.
In order to improve the performance when handling subsequent option headers and the transport protocol which follows, IPng options are always an integer multiple of 8 octets long, in order to retain this alignment for subsequent headers.
The IPng extension headers which are currently defined are:
Routing
Extended Routing (like IPv4 loose source route).
Fragmentation
Fragmentation and Reassembly.
Authentication
Integrity and Authentication. Security
Encapsulation
Confidentiality.
Hop-by-Hop Option
Special options which require hop by hop processing.
Destination Options
Optional information to be examined by the destination node.

7.0 IPng Addressing

IPng addresses are 128-bits long and are identifiers for individual interfaces and sets of interfaces. IPng Addresses of all types are assigned to interfaces, not nodes. Since each interface belongs to a single node, any of that node's interfaces' unicast addresses may be used as an identifier for the node. A single interface may be assigned multiple IPv6 addresses of any type.
There are three types of IPng addresses. These are unicast, anycast, and multicast. Unicast addresses identify a single interface. Anycast addresses identify a set of interfaces such that a packet sent to a anycast address will be delivered to one member of the set. Multicast addresses identify a group of interfaces, such that a packet sent to a multicast address is delivered to all of the interfaces in the group. There are no broadcast addresses in IPv6, their function being superseded by multicast addresses.
IPng supports addresses which are four times the number of bits as IPv4 addresses (128 vs. 32). This is 4 Billion times 4 Billion times 4 Billion (2^^96) times the size of the IPv4 address space (2^^32). This works out to be:
340,282,366,920,938,463,463,374,607,431,768,211,456
This is an extremely large address space. In a theoretical sense this is approximately 665,570,793,348,866,943,898,599 addresses per square meter of the surface of the planet Earth (assuming the earth surface is 511,263,971,197,990 square meters).
In more practical terms the assignment and routing of addresses requires the creation of hierarchies which reduces the efficiency of the usage of the address space. Christian Huitema performed an analysis in [8] which evaluated the efficiency of other addressing architecture's (including the French telephone system, USA telephone systems, current internet using IPv4, and IEEE 802 nodes). He concluded that 128bit IPng addresses could accommodate between 8x10^^17 to 2x10^^33 nodes assuming efficiency in the same ranges as the other addressing architecture's. Even his most pessimistic estimate this would provide 1,564 addresses for each square meter of the surface of the planet Earth. The optimistic estimate would allow for 3,911,873,538,269,506,102 addresses for each square meter of the surface of the planet Earth.
The specific type of IPng address is indicated by the leading bits in the address. The variable-length field comprising these leading bits is called the Format Prefix (FP). The initial allocation of these prefixes is as follows:
Allocation   Prefix(binary) Fraction of Address Space

Reserved   0000 0000 1/256
Unassigned   0000 0001 1/256

Reserved for NSAP Allocation 0000 001 1/128
Reserved for IPX Allocation 0000 010 1/128

Unassigned   0000 011 1/128
Unassigned   0000 1  1/32
Unassigned   0001  1/16
Unassigned   001  1/8

Provider-Based Unicast Address 010  1/8

Unassigned   011  1/8

Reserved for
Neutral-Interconnect-Based
Unicast Addresses  100  1/8

Unassigned   101  1/8
Unassigned   110  1/8
Unassigned   1110  1/16
Unassigned   1111 0  1/32
Unassigned   1111 10  1/64
Unassigned   1111 110 1/128
Unassigned   1111 1110 0  1/512

Link Local Use Addresses 1111 1110 10  1/1024

Site Local Use Addresses 1111 1110 11  1/1024

Multicast Addresses  1111 1111 1/256

This allocation supports the 
direct allocation of provider addresses, local use addresses, and multicast 
addresses. Space is reserved for NSAP addresses, IPX addresses, and 
neutral-interconnect addresses. The remainder of the address space is unassigned 
for future use. This can be used for expansion of existing use (e.g., additional 
provider addresses, etc.) or new uses (e.g., separate locators and identifiers). 
Note that Anycast addresses are not shown here because they are allocated out of 
the unicast address space. 
Approximately fifteen percent of the address space is initially allocated. The remaining 85% is reserved for future use.

7.1 Unicast Addresses

There are several forms of unicast address assignment in IPv6. These are the global provider based unicast address, the neutral-interconnect unicast address, the NSAP address, the IPX hierarchical address, the site-local-use address, the link-local-use address, and the IPv4-capable host address. Additional address types can be defined in the future.

7.2 Provider Based Unicast Addresses

Provider based unicast addresses are used for global communication. They are similar in function to IPv4 addresses under CIDR. The assignment plan for unicast addresses is described in [9] and [10]. Their format is:
     | 3 |  n bits   |  m bits   |   o bits    | p bits  | o-p bits |
     +---+-----------+-----------+-------------+---------+----------+
     |010|REGISTRY ID|PROVIDER ID|SUBSCRIBER ID|SUBNET ID| INTF. ID |
     +---+-----------+-----------+-------------+---------+----------+
The first 3 bits identify the address as a provider- oriented unicast address. The next field (REGISTRY ID) identifies the internet address registry which assigns provider identifiers (PROVIDER ID) to internet service providers, which then assign portions of the address space to subscribers. This usage is similar to assignment of IP addresses under CIDR. The SUBSCRIBER ID distinguishes among multiple subscribers attached to the internet service provider identified by the PROVIDER ID. The SUBNET ID identifies a specific physical link. There can be multiple subnets on the same physical link. A specific subnet can not span multiple physical links. The INTERFACE ID identifies a single interface among the group of interfaces identified by the subnet prefix.

7.3 Local-Use Addresses

A local-use address is a unicast address that has only local routability scope (within the subnet or within a subscriber network), and may have local or global uniqueness scope. They are intended for use inside of a site for "plug and play" local communication and for bootstrapping up to the use of global addresses [11].
There are two types of local-use unicast addresses defined. These are Link-Local and Site-Local. The Link-Local-Use is for use on a single link and the Site-Local-Use is for use in a single site. Link-Local- Use addresses have the following format:
     |   10     |
     |  bits    |        n bits           |       118-n bits           |
     +----------+-------------------------+----------------------------+
     |1111111010|           0             |       INTERFACE ID         |
     +----------+-------------------------+----------------------------+
Link-Local-Use addresses are designed to be used for addressing on a single link for purposes such as auto-address configuration.
Site-Local-Use addresses have the following format:
     |   10     |
     |  bits    | n bits  |    m bits     |       118-n-m bits         |
     +----------+---------+---------------+----------------------------+
     |1111111011|    0    |   SUBNET ID   |       INTERFACE ID         |
     +----------+---------+---------------+----------------------------+
For both types of local use addresses the INTERFACE ID is an identifier which much be unique in the domain in which it is being used. In most cases these will use a node's IEEE-802 48bit address. The SUBNET ID identifies a specific subnet in a site. The combination of the SUBNET ID and the INTERFACE ID to form a local use address allows a large private internet to be constructed without any other address allocation.
Local-use addresses allow organizations that are not (yet) connected to the global Internet to operate without the need to request an address prefix from the global Internet address space. Local-use addresses can be used instead. If the organization later connects to the global Internet, it can use its SUBNET ID and INTERFACE ID in combination with a global prefix (e.g., REGISTRY ID + PROVIDER ID + SUBSCRIBER ID) to create a global address. This is a significant improvement over IPv4 which requires sites which use private (non-global) IPv4 address to manually renumber when they connect to the Internet. IPng does the renumbering automatically.

7.4 IPv6 Addresses with Embedded IPV4 Addresses

The IPv6 transition mechanisms include a technique for hosts and routers to dynamically tunnel IPv6 packets over IPv4 routing infrastructure. IPv6 nodes that utilize this technique are assigned special IPv6 unicast addresses that carry an IPv4 address in the low-order 32-bits. This type of address is termed an "IPv4-compatible IPv6 address" and has the format:
     |                80 bits               | 16 |      32 bits        |
     +--------------------------------------+--------------------------+
     |0000..............................0000|0000|    IPV4 ADDRESS     |
     +--------------------------------------+----+---------------------+
A second type of IPv6 address 
which holds an embedded IPv4 address is also defined. This address is used to 
represent the addresses of IPv4- only nodes (those that *do not* support IPv6) 
as IPv6 addresses. This type of address is termed an "IPv4-mapped IPv6 address" 
and has the format: 
     |                80 bits               | 16 |      32 bits        |
     +--------------------------------------+--------------------------+
     |0000..............................0000|FFFF|    IPV4 ADDRESS     |
     +--------------------------------------+----+---------------------+

7.5 Anycast Addresses

An IPv6 anycast address is an address that is assigned to more than one interfaces (typically belonging to different nodes), with the property that a packet sent to an anycast address is routed to the "nearest" interface having that address, according to the routing protocols' measure of distance.
Anycast addresses, when used as part of an route sequence, permits a node to select which of several internet service providers it wants to carry its traffic. This capability is sometimes called "source selected policies". This would be implemented by configuring anycast addresses to identify the set of routers belonging to internet service providers (e.g., one anycast address per internet service provider). These anycast addresses can be used as intermediate addresses in an IPv6 routing header, to cause a packet to be delivered via a particular provider or sequence of providers. Other possible uses of anycast addresses are to identify the set of routers attached to a particular subnet, or the set of routers providing entry into a particular routing domain.
Anycast addresses are allocated from the unicast address space, using any of the defined unicast address formats. Thus, anycast addresses are syntactically indistinguishable from unicast addresses. When a unicast address is assigned to more than one interface, thus turning it into an anycast address, the nodes to which the address is assigned must be explicitly configured to know that it is an anycast address.

7.6 Multicast Addresses

A IPng multicast address is an identifier for a group of interfaces. A interface may belong to any number of multicast groups. Multicast addresses have the following format:
                         
     |   8    |  4 |  4 |                  112 bits                   |
     +------ -+----+----+---------------------------------------------+
     |11111111|FLGS|SCOP|                  GROUP ID                   |
     +--------+----+----+---------------------------------------------+
11111111 at the start of the address identifies the address as being a multicast address.
+-+-+-+-+ FLGS is a set of 4 flags: |0|0|0|T| +-+-+-+-+
The high-order 3 flags are reserved, and must be initialized to 0.
T=0 indicates a permanently assigned ("well-known") multicast address, assigned by the global internet numbering authority.
T=1 indicates a non-permanently assigned ("transient") multicast address.
SCOP is a 4-bit multicast scope value used to limit the scope of the multicast group. The values are:
0 Reserved 8 Organization-local scope 1 Node-local scope 9 (unassigned) 2 Link-local scope A (unassigned) 3 (unassigned) B (unassigned) 4 (unassigned) C (unassigned) 5 Site-local scope D (unassigned) 6 (unassigned) E Global scope 7 (unassigned) F Reserved
GROUP ID identifies the multicast group, either permanent or transient, within the given scope.

8.0 IPng Routing

Routing in IPng is almost identical to IPv4 routing under CIDR except that the addresses are 128- bit IPng addresses instead of 32-bit IPv4 addresses. With very straightforward extensions, all of IPv4's routing algorithms (OSPF, RIP, IDRP, ISIS, etc.) can used to route IPng.
IPng also includes simple routing extensions which support powerful new routing functionality. These capabilities include:
  • Provider Selection (based on policy, performance, cost, etc.)
  • Host Mobility (route to current location)
  • Auto-Readdressing (route to new address)
The new routing functionality is obtained by creating sequences of IPng addresses using the IPng Routing option. The routing option is used by a IPng source to list one or more intermediate nodes (or topological group) to be "visited" on the way to a packet's destination. This function is very similar in function to IPv4's Loose Source and Record Route option.
In order to make address sequences a general function, IPng hosts are required in most cases to reverse routes in a packet it receives (if the packet was successfully authenticated using the IPng Authentication Header) containing address sequences in order to return the packet to its originator. This approach is taken to make IPng host implementations from the start support the handling and reversal of source routes. This is the key for allowing them to work with hosts which implement the new features such as provider selection or extended addresses.
Three examples show how the address sequences can be used. In these examples, address sequences are shown by a list of individual addresses separated by commas. For example:
SRC, I1, I2, I3, DST
Where the first address is the source address, the last address is the destination address, and the middle addresses are intermediate addresses.
For these examples assume that two hosts, H1 and H2 wish to communicate. Assume that H1 and H2's sites are both connected to providers P1 and P2. A third wireless provider, PR, is connected to both providers P1 and P2.
                           ----- P1 ------
                          /       |       \
                         /        |        \
                       H1        PR        H2
                         \        |        /
                          \       |       /
                           ----- P2 ------
The simplest case (no use of address sequences) is when H1 wants to send a packet to H2 containing the addresses:
H1, H2
When H2 replied it would reverse the addresses and construct a packet containing the addresses:
H2, H1
In this example either provider could be used, and H1 and H2 would not be able to select which provider traffic would be sent to and received from.
If H1 decides that it wants to enforce a policy that all communication to/from H2 can only use provider P1, it would construct a packet containing the address sequence:
H1, P1, H2
This ensures that when H2 replies to H1, it will reverse the route and the reply it would also travel over P1. The addresses in H2's reply would look like:
H2, P1, H1
If H1 became mobile and moved to provider PR, it could maintain (not breaking any transport connections) communication with H2, by sending packets that contain the address sequence:
H1, PR, P1, H2
This would ensure that when H2 replied it would enforce H1's policy of exclusive use of provider P1 and send the packet to H1 new location on provider PR. The reversed address sequence would be:
H2, P1, PR, H1
The address sequence facility of IPng can be used for provider selection, mobility, and readdressing. It is a simple but powerful capability.

9.0 IPng Quality-of-Service Capabilities

The Flow Label and the Priority fields in the IPng header may be used by a host to identify those packets for which it requests special handling by IPng routers, such as non-default quality of service or "real-time" service. This capability is important in order to support applications which require some degree of consistent throughput, delay, and/or jitter. These type of applications are commonly described as "multi- media" or "real-time" applications.

9.1 Flow Labels

The 24-bit Flow Label field in the IPv6 header may be used by a source to label those packets for which it requests special handling by the IPv6 routers, such as non-default quality of service or "real-time" service.
This aspect of IPv6 is, at the time of writing, still experimental and subject to change as the requirements for flow support in the Internet become clearer. Hosts or routers that do not support the functions of the Flow Label field are required to set the field to zero when originating a packet, pass the field on unchanged when forwarding a packet, and ignore the field when receiving a packet.
A flow is a sequence of packets sent from a particular source to a particular (unicast or multicast) destination for which the source desires special handling by the intervening routers. The nature of that special handling might be conveyed to the routers by a control protocol, such as a resource reservation protocol, or by information within the flow's packets themselves, e.g., in a hop-by-hop option.
There may be multiple active flows from a source to a destination, as well as traffic that is not associated with any flow. A flow is uniquely identified by the combination of a source address and a non- zero flow label. Packets that do not belong to a flow carry a flow label of zero.
A flow label is assigned to a flow by the flow's source node. New flow labels must be chosen (pseudo-)randomly and uniformly from the range 1 to FFFFFF hex. The purpose of the random allocation is to make any set of bits within the Flow Label field suitable for use as a hash key by routers, for looking up the state associated with the flow.
All packets belonging to the same flow must be sent with the same source address, same destination address, and same non-zero flow label. If any of those packets includes a Hop-by-Hop Options header, then they all must be originated with the same Hop-by-Hop Options header contents (excluding the Next Header field of the Hop-by-Hop Options header). If any of those packets includes a Routing header, then they all must be originated with the same contents in all extension headers up to and including the Routing header (excluding the Next Header field in the Routing header). The routers or destinations are permitted, but not required, to verify that these conditions are satisfied. If a violation is detected, it should be reported to the source by an ICMP Parameter Problem message, Code 0, pointing to the high-order octet of the Flow Label field (i.e., offset 1 within the IPv6 packet) [12].
Routers are free to "opportunistically" set up flow- handling state for any flow, even when no explicit flow establishment information has been provided to them via a control protocol, a hop-by-hop option, or other means. For example, upon receiving a packet from a particular source with an unknown, non-zero flow label, a router may process its IPv6 header and any necessary extension headers as if the flow label were zero. That processing would include determining the next-hop interface, and possibly other actions, such as updating a hop-by-hop option, advancing the pointer and addresses in a Routing header, or deciding on how to queue the packet based on its Priority field. The router may then choose to "remember" the results of those processing steps and cache that information, using the source address plus the flow label as the cache key. Subsequent packets with the same source address and flow label may then be handled by referring to the cached information rather than examining all those fields that, according to the requirements of the previous paragraph, can be assumed unchanged from the first packet seen in the flow.

9.2 Priority

The 4-bit Priority field in the IPv6 header enables a source to identify the desired delivery priority of its packets, relative to other packets from the same source. The Priority values are divided into two ranges: Values 0 through 7 are used to specify the priority of traffic for which the source is providing congestion control, i.e., traffic that "backs off" in response to congestion, such as TCP traffic. Values 8 through 15 are used to specify the priority of traffic that does not back off in response to congestion, e.g., "real-time" packets being sent at a constant rate.
For congestion-controlled traffic, the following Priority values are recommended for particular application categories:
0    Uncharacterized traffic
1    "Filler" traffic (e.g., netnews)
2    Unattended data transfer (e.g., email)
3    (Reserved)
4    Attended bulk transfer (e.g., FTP, HTTP, NFS)
5    (Reserved)
6    Interactive traffic (e.g., telnet, X)
7    Internet control traffic (e.g., routing protocols, SNMP)
For non-congestion-controlled traffic, the lowest Priority value (8) should be used for those packets that the sender is most willing to have discarded under conditions of congestion (e.g., high-fidelity video traffic), and the highest value (15) should be used for those packets that the sender is least willing to have discarded (e.g., low-fidelity audio traffic). There is no relative ordering implied between the congestion-controlled priorities and the non-congestion-controlled priorities.

10. IPng Security

The current Internet has a number of security problems and lacks effective privacy and authentication mechanisms below the application layer. IPng remedies these shortcomings by having two integrated options that provide security services [13]. These two options may be used singly or together to provide differing levels of security to different users. This is very important because different user communities have different security needs.
The first mechanism, called the "IPng Authentication Header", is an extension header which provides authentication and integrity (without confidentiality) to IPng datagrams [14]. While the extension is algorithm- independent and will support many different authentication techniques, the use of keyed MD5 is proposed to help ensure interoperability within the worldwide Internet. This can be used to eliminate a significant class of network attacks, including host masquerading attacks. The use of the IPng Authentication Header is particularly important when source routing is used with IPng because of the known risks in IP source routing. Its placement at the internet layer can help provide host origin authentication to those upper layer protocols and services that currently lack meaningful protections. This mechanism should be exportable by vendors in the United States and other countries with similar export restrictions because it only provides authentication and integrity, and specifically does not provide confidentiality. The exportability of the IPng Authentication Header encourages its widespread deployment and use.
The second security extension header provided with IPng is the "IPng Encapsulating Security Header" [15]. This mechanism provides integrity and confidentiality to IPng datagrams. It is simpler than some similar security protocols (e.g., SP3D, ISO NLSP) but remains flexible and algorithm-independent. To achieve interoperability within the global Internet, the use of DES CBC is being used as the standard algorithm for use with the IPng Encapsulating Security Header.

11. IPng Transition Mechanisms

The key transition objective is to allow IPv6 and IPv4 hosts to interoperate. A second objective is to allow IPv6 hosts and routers to be deployed in the Internet in a highly diffuse and incremental fashion, with few interdependencies. A third objective is that the transition should be as easy as possible for end- users, system administrators, and network operators to understand and carry out.
The IPng transition mechanisms are a set of protocol mechanisms implemented in hosts and routers, along with some operational guidelines for addressing and deployment, designed to make transition the Internet to IPv6 work with as little disruption as possible [16].
The IPng transition mechanisms provides a number of features, including:
  • Incremental upgrade and deployment. Individual IPv4 hosts and routers may be upgraded to IPv6 one at a time without requiring any other hosts or routers to be upgraded at the same time. New IPv6 hosts and routers can be installed one by one.
  • Minimal upgrade dependencies. The only prerequisite to upgrading hosts to IPv6 is that the DNS server must first be upgraded to handle IPv6 address records. There are no pre-requisites to upgrading routers.
  • Easy Addressing. When existing installed IPv4 hosts or routers are upgraded to IPv6, they may continue to use their existing address. They do not need to be assigned new addresses. Administrators do not need to draft new addressing plans.
  • Low start-up costs. Little or no preparation work is needed in order to upgrade existing IPv4 systems to IPv6, or to deploy new IPv6 systems. The mechanisms employed by the IPng transition mechanisms include:
  • An IPv6 addressing structure that embeds IPv4 addresses within IPv6 addresses, and encodes other information used by the transition mechanisms.
  • A model of deployment where all hosts and routers upgraded to IPv6 in the early transition phase are "dual" capable (i.e. implement complete IPv4 and IPv6 protocol stacks).
  • The technique of encapsulating IPv6 packets within IPv4 headers to carry them over segments of the end-to-end path where the routers have not yet been upgraded to IPv6.
  • The header translation technique to allow the eventual introduction of routing topologies that route only IPv6 traffic, and the deployment of hosts that support only IPv6. Use of this technique is optional, and would be used in the later phase of transition if it is used at all.
The IPng transition mechanisms ensures that IPv6 hosts can interoperate with IPv4 hosts anywhere in the Internet up until the time when IPv4 addresses run out, and allows IPv6 and IPv4 hosts within a limited scope to interoperate indefinitely after that. This feature protects the huge investment users have made in IPv4 and ensures that IPv6 does not render IPv4 obsolete. Hosts that need only a limited connectivity range (e.g., printers) need never be upgraded to IPv6.
The incremental upgrade features of the IPng transition mechanisms allow the host and router vendors to integrate IPv6 into their product lines at their own pace, and allows the end users and network operators to deploy IPng on their own schedules.

12. Why IPng?

There are a number of reasons why IPng is appropriate for the next generation of the Internet Protocol. It solves the Internet scaling problem, provides a flexible transition mechanism for the current Internet, and was designed to meet the needs of new markets such as nomadic personal computing devices, networked entertainment, and device control. It does this in a evolutionary way which reduces the risk of architectural problems.
Ease of transition is a key point in the design of IPng. It is not something was added in at the end. IPng is designed to interoperate with IPv4. Specific mechanisms (embedded IPv4 addresses, pseudo- checksum rules etc.) were built into IPng to support transition and compatibility with IPv4. It was designed to permit a gradual and piecemeal deployment with a minimum of dependencies.
IPng supports large hierarchical addresses which will allow the Internet to continue to grow and provide new routing capabilities not built into IPv4. It has anycast addresses which can be used for policy route selection and has scoped multicast addresses which provide improved scalability over IPv4 multicast. It also has local use address mechanisms which provide the ability for "plug and play" installation.
The address structure of IPng was also designed to support carrying the addresses of other internet protocol suites. Space was allocated in the addressing plan for IPX and NSAP addresses. This was done to facilitate migration of these internet protocols to IPng.
IPng provides a platform for new Internet functionality. This includes support for real-time flows, provider selection, host mobility, end-to- end security, auto-configuration, and auto-reconfiguration.
In summary, IPng is a new version of IP. It can be installed as a normal software upgrade in internet devices. It is interoperable with the current IPv4. Its deployment strategy was designed to not have any "flag" days. IPng is designed to run well on high performance networks (e.g., ATM) and at the same time is still efficient for low bandwidth networks (e.g., wireless). In addition, it provides a platform for new internet functionality that will be required in the near future.

13. Where to Get Additional Information

A set of world wide web (WWW) pages is available describing IPng. It can be found at
http://playground.sun.com/pub/ipng/html/ipng-main.html
These web pages contain pointers to current specifications and implementations and will be updated on a regular basis.
The documentation listed in the reference sections can be found in one of the IETF internet draft directories.
To join the IPng working group, send an electronic mail message to:
majordomo@sunroof.eng.sun.com 
with subscribe ipng in the body portion of the message.
An archive of mail sent to this mailing list can be found in the IETF directories at cnri.reston.va.us.

References

[1]
S. Bradner, A. Mankin, RFC 1752, "The Recommendation for the IP Next Generation Protocol", January 1995.
[2]
V. Fuller, et al, "Supernetting: an Address Assignment and Aggregation Strategy", RFC 1338, June 1992.
[3]
S. Deering, "Simple Internet Protocol Plus (SIPP) Specification (128-bit address version)", Internet Draft, July 1994.
[4]
J. Postel, "Internet Protocol", RFC-791, September, 1981.
[5]
S. Deering, R. Hinden, Editors, "Internet Protocol, Version 6 (IPv6) Specification", Internet Draft, March 1995.
[6]
J. Postel, "Assigned Numbers", RFC-1700, October 1994.
[7]
R. Hinden, Editor, "IP Version 6 Addressing Architecture", Internet Draft, April 1995.
[8]
C. Huitema, "The H Ratio for Address Assignment Efficiency" RFC-1715, November 1994.
[9]
Y. Rekhter, T. Li, "An Architecture for IPv6 Unicast Address Allocation", Internet Draft, March 1995.
[10]
Y. Rekhter, P. Lothberg, "An IPv6 Global Unicast Address Format", Internet Draft, March 1995.
[11]
S. Thomson, "IPv6 Address Autoconfiguration", Internet Draft, February 1995.
[12]
A. Conta, S. Deering, "ICMP for the Internet Protocol Version 6 (IPv6)", Internet Draft, January 1995.
[13]
R. Atkinson, "IPv6 Security Architecture" Internet Draft, March 1995.
[14]
R. Atkinson, "IP Authentication Header", Internet Draft, March 1995.
[15]
R. Atkinson, "IPng Encapsulating Security Payload (ESP)", March 1995.
[16]
R. Gilligan, E. Nordmark, "Transition Mechanisms for IPv6 Hosts and Routers", Internet Draft, March 1995.

Basic Cisco configuration commands




1.      Connect PC Ethernet port and Cisco router Ethernet port  by using:
  • Cross-over UTP cable  (cable with pin 1 connected to pin 6 and pin 2 connected to pin 6, both on RJ45 connector) or by using:
  • HUB and two straight UTP cables.
2.      Power on the router and look at the massages appearing on the screen, while the router is booting

Part 1
BASIC COMMANDS
Using the commands on the router:
  • show version
  • show ip interface brief (or show interface)
Answer the following questions:
1. Router name:
2. Router type:
3. IOS version:
4. Memory amount:
5. Flash ROM amount:
6. Number and types of interfaces:

Part 2
              
Part 3
Set up a new  IP address, mask and Default Gateway  on each  WG PC
  • Each WG should decide which IP addresses will be used (from each subnet) for PC to router connection and for router to router connection . 
  • Start -> Settings -> Control panel -> Network -> TCP/IP Ethernet… -> Properties -> IP address and Gateway
Part 4
Displaying the configurations
      Enter privilege mode (enable)
     Display the configuration saved in NVRAM (show config)
     Display the running configuration (show running-config)

Setting and changing the configuration
      Enter the configuration mode (conf term)
     Change the router name (hostname)
     Exit the privilege mode (CTRL-Z), you are back in Privileged mode!
     Save the configuration (copy running-config startup-config)

Setting the passwords (REMEMBER YOUR PASSWORD)
      Enter the configuration mode (conf term)
     Specify virtual terminal lines you would like to configure (line vty 0 4)
     Request login authentication (login)
     Set a password for the exec mode (password my_password)
     Set a password for the privileged (enable secret my_password)
     Exit the privilege mode (CTRL-Z), you are back in Privileged mode!
Configuring the interface
     Enter the configuration mode (conf term)
     Select first ethernet interface 
     (interface ethernet - you got all the types of interfaces from part 1 task – for example Interface Ethernet0/0)
     Select the ip address and subnet mask (ip address your_IP_address  mask )
     Enable the interface (no shut)
     Exit the privilege mode (CTRL-Z), you are back in Privileged mode!
Checking router status and IP connectivity
      Check host connectivity (ping connected_PC_ip_address)
     Check host reachability (trace connected_PC_ip_address)
     Check status of an interface (show interface eth?)
     Display debug information (debug ip icmp)
     Disable debug information (undebug all)
Part 5
 Establishing router to router connectivity:
 Configuring the Serial interface:
  Enter the configuration mode (conf term)
     Select first Serial interface 
    (interface Serial - you got all the types of interfaces from part 1 task – for example Interface Serial0)
     Select the ip address and subnet mask (ip address your_IP_address  mask )
      Find out which Serial interface got connected DCE and which DTE CISCO cable
·        DTE (Data Terminal Equipment – MALE conector)
·        DCE (Data Communication Equipment – FEMALE connector)
      On Serial Interface with DCE cable enable line CLOCK by entering the command:
·        clock rate 1000000
      Enable the interface (no shut)
     Exit the privilege mode (CTRL-Z), you are back in Privileged mode!
  Connect DTE and DCE cable
  Checking router status and IP connectivity
      Check neighbor router connectivity (ping connected_router_ip_address)
     Check status of an interface (show interface serial?)
 Provide routers  with info where other (not directly connected) subnets  are by configuring static routes on each router:
 The command is:
 ip route
 ·         is the subnet used for router-to-PC connection on the neighbor router
or the subnet between next two routers
·         is IP address of  serial interface on the neighbor router
 Check  connectivity  (ping) from your PC to all other PC’s in your WG
·        open DOS window  (Start -> Programs -> DOS)
·        ping host_ip_address
 Check  reachibility (traceroute) from your PC to all other PS’s in your WG
·        open DOS window (Start -> Programs -> DOS)
·        tracert host_ip_address
Part 6  (optional)
 Connect your network to other WG network (by Ethernet or Serial connection):
·        decide which subnet will be used for interconnection
·        configure static routes to other subnets
·        Check  connectivity  (ping) from your PC to all other PC’s (in others WG)
·        Check  reachibility (traceroute) from your PC to all other PS’s (in others WG)