% Linux Installation and Getting Started    -*- TeX -*-
% general.tex
% Copyright (c) 1992-1994 by Matt Welsh <mdw@sunsite.unc.edu>
%
% This file is freely redistributable, but you must preserve this copyright 
% notice on all copies, and it must be distributed only as part of "Linux 
% Installation and Getting Started". This file's use is covered by the 
% copyright for the entire document, in the file "copyright.tex".

\subsection{Basic commands and utilities}

Virtually every utility that you would expect to find on standard 
implementations of UNIX has been ported to Linux. This includes basic
commands such as {\tt ls}, {\tt awk}, {\tt tr}, {\tt sed}, {\tt bc}, 
{\tt more}, and so on. You name it, Linux has it. Therefore, 
you can expect your familiar working environment on other UNIX
systems to be duplicated on Linux. All of the standard commands and
utilities are there. (Novice Linux users should see 
Chapter~\ref{chap-tutorial} for an introduction to these basic UNIX
commands.)

Many text editors are available, including {\tt vi}, {\tt ex}, 
{\tt pico}, {\tt jove}, as well as GNU Emacs and variants such as 
Lucid Emacs (which incorporates extensions for use under X~Windows)
and {\tt joe}. Whatever text editor you're accustomed to using has
more than likely been ported to Linux.
\index{editors}
\index{text editors}
\index{vi@{\tt vi}}
\index{Emacs}

The choice of a text editor is an interesting one. Many UNIX users still
use ``simple'' editors such as {\tt vi} (in fact, the author wrote this book
using {\tt vi} under Linux). However, {\tt vi} has many limitations,
due to its age, and more modern (and complex) editors such as Emacs are 
gaining popularity. 
Emacs supports a complete LISP-based macro language and interpreter, a 
powerful command syntax, and other fun-filled extensions. 
Emacs macro packages exist to 
allow you to read electronic mail and news, edit the contents of directories, 
and even engage in an artificially intelligent psychotherapy session 
(indispensible for stressed-out Linux hackers). 

One interesting note is that most of the basic Linux utilities are GNU 
software.
\index{GNU}
These GNU utilities support advanced features not found in the
standard versions from BSD or AT\&T. For example, GNU's version of
the {\tt vi} editor, {\tt elvis}, includes a structured macro
language which differs from the original AT\&T implementation.
However, the GNU utilities strive to remain compatible 
with their BSD and System V counterparts. Many people consider the GNU
versions of these programs superior to the originals.

The most important utility to many users is the {\bf shell}. 
\index{shells}
The shell
is a program which reads and executes commands from the user. In addition,
many shells provide features such as {\bf job control} (allowing
the user to manage several running processes at once---not as Orwellian as
it sounds), input and output
redirection, and a command language for writing {\bf shell scripts}.
A shell script is a file containing a program in the shell command
language, analogous to a ``batch file'' under MS-DOS.
\index{shell script}

There are many types of shells available for Linux. The most important
difference between shells is the command language. For example, the 
{\bf C Shell} ({\tt csh}) uses a command language somewhat like
the C programming language. The classic {\bf Bourne Shell} uses
a different command language. One's choice of a shell is often
based on the command language that it provides. The shell that you 
use defines, to some extent, your working environment under Linux. 
\index{Bourne shell}
\index{csh@{\tt csh}}
\index{C Shell (csh)@C Shell ({\tt csh})}

No matter what shell you're accustomed to, some version of it has 
probably been ported to Linux. The most popular shell is
the GNU Bourne Again Shell ({\tt bash}), 
\index{software!bash@{\tt bash}}
a Bourne shell variant 
which includes many advanced features, such as job control, command
history, command and filename completion, an Emacs-like interface 
for editing the command line, and powerful extensions to the standard
Bourne shell language. Another popular shell is {\tt tcsh}, a version
\index{software!tcsh@{\tt tcsh}}
of the C Shell with advanced functionality similar to that found in {\tt bash}.
Other shells include {\tt zsh}, a small Bourne-like shell; the Korn shell
({\tt ksh}); BSD's {\tt ash}; and {\tt rc}, the Plan 9 shell. 

What's so important about these basic utilities? 
Linux gives you the unique opportunity to tailor a custom system to your
needs. For example, if you're the only person who uses your system,
and you prefer to exclusively use the {\tt vi} editor, and {\tt bash}
as your shell, there's no reason to install other editors or shells.
The ``do it yourself'' attitude is prevalent among Linux hackers and users.

