When logged in at the command line or
when using a terminal window, a shell prompt appears on the screen. For the Bourne and Korn shells, the shell prompt for a user is a
dollar sign ($). For a C shell user, the prompt is a percent sign
(%).
At the shell prompt, you can type commands. Commands are instructions
which tell the system to perform an action. Syntax refers to the
structure of the command and specifies allowable options and
arguments.
-
The general format for UNIX commands is:
$
command [option(s)] [argument(s)].
Note: Items in square brackets are optional, meaning they are not always
required.
A space must be used as a delimiter
between each part of the command entered. Up to 256 characters can be
entered on a single command line. UNIX commands are always lower case. Options are usually a single letter
preceded by a hyphen (-), also called a dash or minus sign. Multiple
options can be combined using only one hyphen. The option might be
upper or lower case depending on the command. Many commands do not
require all three parts. Multiple commands can be entered on one line
by separating them with a semicolon (;).
Figure
illustrates some examples of UNIX commands with and without options and
arguments.
 |
 |
Lab
Activity
(Adobe
Acrobat Reader, 25 kB) |
| |
Basic
Command Line Syntax
In
this lab, you will work with various UNIX commands
to develop an understanding of UNIX commands and
syntax. |
|
|
|
|