introduction(9) introduction(9)
NAME [Toc] [Back]
introduction - introduction to the HP-UX operating system and the HPUX
Reference
INTRODUCTION [Toc] [Back]
HP-UX is the Hewlett-Packard Company's implementation of an operating
system that is compatible with various industry standards. It is
based on the UNIX(R) System V Release 4 operating system and includes
important features from the Fourth Berkeley Software Distribution.
Improvements include enhanced capabilities and other features,
developed by HP to make HP-UX a very powerful, useful, and reliable
operating system, capable of supporting a wide range of applications
ranging from simple text processing to sophisticated engineering
graphics and design. It can readily be used to control instruments
and other peripheral devices. Real-time capabilities further expand
the flexibility of HP-UX as a powerful tool for solving tough problems
in design, manufacturing, business, and other areas where
responsiveness and performance are important.
Extensive international language support enables HP-UX to interact
with users in any of dozens of human languages. HP-UX interfaces
easily with local area networks and resource-sharing facilities. By
using industry-standard protocols, HP-UX provides flexible interaction
with other computers and operating systems. Optional software
products extend HP-UX capabilities into a broad range of specialized
needs.
The HP-UX Reference is not a learning tool for beginners. It is
primarily a reference tool that is most useful for experienced users
of UNIX or UNIX-like systems. If you are not already familiar with
UNIX or HP-UX, refer to the series of Beginner's Guides, tutorial
manuals, and other learning documents supplied with your system or
available separately. System implementation and maintenance details
are explained in the Managing Systems and Workgroups manual.
OTHER MANPAGES [Toc] [Back]
This introduction and the section intro manpages describe the "core"
manpages that are delivered with the Operating System. Other manpages
may be delivered separately with optional HP-UX and third-party
software and may reside in the same directories as the core manpages,
or in other directories.
MANPAGE ORGANIZATION [Toc] [Back]
The contents of the HP-UX Reference and its on-line counterpart are a
number of independent entries called manpages. These are also called
manual entries or reference pages.
For convenient reference, the manpages are divided into eight
specialized sections. The printed manual also has a table of contents
for each volume and a composite index.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
Each manpage consists of one or more printed pages, with the manpage
name and section number printed in the upper corners. Manpages are
arranged alphabetically within each section of the reference, except
for the intro page at the beginning of each section. Manpages are
referred to by name and section number, in the form pagename(section).
The manpages are available on-line through the man command if the
manpages are present on the system. Refer to the man(1) manpage in
Section 1 for more information.
Each page in the printed manual has two page numbers, printed at the
bottom of the page. The center page number starts over with page 1 at
the beginning of each new manpage; it is placed between two dashes in
normal typeface. The number printed at the outside corner on each
page sequences the printed pages within a section. Users usually
locate manpages by the alphabetic headings at the top of the page as
when reading a dictionary.
Some manpages describe two or more commands or routines. In such
cases, the manpage is usually named for the first command or function
that appears in the NAME section. Occasionally, a manpage name
appears as a descriptor in the NAME section. In such instances, the
name describes the commands or functions in more general terms. For
example, the acct(1M) manpage describes the acctdisk, acctdusg,
accton, and acctwtmp commands, while the string(3C) manpage describes
many character string functions.
The various sections are described as follows:
Volume Table of Contents (Printed Manual)
A complete listing of all manpages in the order they appear in
each section, as well as alphabetically intermixed lists of all
command, function, and feature names that are the different from
the manpage where they appear.
Section 1: User Commands
Programs that are usually invoked directly by users or from
command language procedures (scripts).
Section 1M: System Administration Commands
Commands used for system installation and maintenance, including
boot processes, crash recovery, system integrity testing, and
other needs. Most commands in this section require the superuser
privilege.
Section 2: System Calls
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
Entries into the HP-UX kernel, including the C-language
interface. These topics are primarily of interest to
programmers.
Section 3: Library Functions
Available subroutines that reside (in binary form) in various
system libraries. These topics are primarily of interest to
programmers.
Section 4: File Formats
The structure of various types of files, primarily of interest to
administrators and programmers. For example, the link editor
output file format is described in a.out(4). Files that are used
only by a single command (such as intermediate files used by
assemblers) are not described. C-language declarations
corresponding to the formats in Section 4 can be found in the
directories /usr/include and /usr/include/sys.
Section 5: Miscellaneous
A variety of information, such as descriptions of header files,
character sets, macro packages, and other topics.
Section 7: Device Special Files
The characteristics of special (device) files that provide the
link between HP-UX and system I/O devices. The names for each
topic usually refer to the type of I/O device rather than to the
names of individual special files.
Section 9: Introduction and Glossary
A general introduction (this one) and definitions of terms used
in the HP-UX environment.
Composite Index (Printed Manual)
An alphabetical listing of keywords and topics based on the NAME
section near the beginning of each manpage as well as other
information, cross-referenced to manpage names and sections. The
index also contains references to built-in features in the
various command interpreters ("shells").
MANPAGE FORMATS [Toc] [Back]
All manpages follow an established section heading format, but not all
section headings are included in each manpage. A few manpages have
self-explanatory specialized headings.
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
NAME Gives the names of the commands, functions, or features and
briefly states the purpose.
SYNOPSIS [Toc] [Back]
Summarizes the syntax of the command or program entity. A few
conventions are used:
Constant-width characters indicate literal characters that should
be entered exactly as they appear. These characters appear in
bold in the online manpages.
Italic strings represent variable elements that should be
replaced with appropriate values.
Roman square brackets ([]) indicate that the contents are
optional.
Roman braces ({}) indicate a required element, usually in a
choice.
Roman OR bars (|) within brackets or braces indicate a choice.
Roman ellipses (...) indicate that the previous element can be
repeated.
Note An argument beginning with a dash (-), a plus sign (+), or
an equal sign (=) is often defined as a command option, even
if it appears in a position where a file name could appear.
Therefore, it is unwise to have files names that begin with
-, +, or =.
DESCRIPTION [Toc] [Back]
Discusses the function and behavior of each entry.
EXTERNAL INFLUENCES [Toc] [Back]
Information under this heading pertains to programming for
various spoken languages. Typical entries indicate support for
single- or multibyte characters, the effect of language-related
environment variables on system behavior, and other related
information.
NETWORKING FEATURES [Toc] [Back]
Information under this heading is applicable only if you are
using the network feature described there (such as NFS).
RETURN VALUE [Toc] [Back]
Describes the values returned by function calls or in the return
code by commands.
DIAGNOSTICS [Toc] [Back]
Describes diagnostic information that may be produced. Self
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
explanatory messages are not listed.
ERRORS [Toc] [Back]
Lists function error conditions (set in errno) and their
corresponding error messages.
EXAMPLES [Toc] [Back]
Provides examples of typical usage.
WARNINGS [Toc] [Back]
Describes potential problems and deficiencies.
DEPENDENCIES [Toc] [Back]
Describes variations in HP-UX operation that are related to the
use of specific hardware or combinations of hardware.
AUTHOR [Toc] [Back]
Indicates the origin of the software documented by the manpage.
Unless noted otherwise, the source of an entry is System V.
FILES [Toc] [Back]
Lists file names that are used or affected by the program or
command.
SEE ALSO [Toc] [Back]
Provides pointers to related manpages and other documentation.
STANDARDS CONFORMANCE [Toc] [Back]
For each command or subroutine entry point addressed by one or
more of the following industry standards, this section lists the
standard specifications to which that HP-UX component conforms.
The various standards are:
AES OSF Application Environment Specification
ANSI C ANSI X3.159-1989
POSIX.1 IEEE Standard 1003.1-1988 (IEEE Computer Society)
(Portable Operating System Interface for Computer
Environments)
POSIX.2 IEEE Standard 1003.2-1990 (IEEE Computer Society)
(Portable Operating System Interface for Computer
Environments)
POSIX.4 IEEE Standard 1003.1b-1993 (IEEE Computer Society)
(Portable Operating System Interface for Computer
Environments)
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
FIPS 151-1 Federal Information Processing Standard 151-1
(National Institute of Standards and Technology)
FIPS 151-2 Federal Information Processing Standard 151-2
(National Institute of Standards and Technology)
SVID2 System V Interface Definition Issue 2
SVID3 System V Interface Definition Issue 3
XPG2 X/Open Portability Guide Issue 2 (X/Open, Ltd.)
XPG3 X/Open Portability Guide Issue 3 (X/Open, Ltd.)
XPG4 X/Open Portability Guide Issue 4 (X/Open, Ltd.)
XPG4.2 X/Open Portability Guide Issue 4 (X/Open, Ltd.)
Version 2
GETTING STARTED WITH HP-UX [Toc] [Back]
This is a very brief overview of how to use the HP-UX system: how to
log in and log out, how to communicate through your machine, and how
to run a program.
HP-UX uses control characters to perform certain functions. Control
characters are generally shown in the form ^x, such as ^D for
Control-D. Hold down the Control (Ctrl) key while you press the
character key.
Logging In [Toc] [Back]
To log in you must have a valid user name and password, which can be
obtained from your system administrator.
When a connection has been established, the system displays login: on
your terminal. Type your user name and press the Return key. Enter
your password (it is not echoed by the system) and press Return.
A list of copyright notices and a message-of-the-day may greet you
before the first prompt.
It is important that you type your login name with lowercase letters,
if possible. If you type uppercase letters, HP-UX assumes that your
terminal cannot generate lowercase letters, and treats subsequent
uppercase input as lowercase.
When you log in successfully, the system starts your login shell. The
default is the POSIX shell, /usr/bin/sh. The POSIX shell (and its
predecessors, the Korn and Bourne shells) uses $ as the default
prompt. The C shell uses %. All the shells use # as the default
superuser prompt.
Hewlett-Packard Company - 6 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
See login(1) for more on login, passwd(1) to change your password,
chsh(1) to change your login shell.
Logging Out [Toc] [Back]
You can log out of the shells by typing an exit command or the eof
(end-of-file) character (see the Special Interactive Characters
subsection below). The shell terminates and the login: prompt appears
again. (If you are using the C, Korn, or POSIX shells, respectively,
see csh(1), ksh(1), or sh-posix(1) for information about the ignoreeof
special command.)
How to Communicate Through Your Terminal [Toc] [Back]
HP-UX gathers keyboard input characters and saves them in a buffer.
The accumulated characters are not passed to the shell or other
program until you type Return.
HP-UX terminal input/output is full-duplex. It has full read-ahead,
which means that you can type at any time, even while a program is
printing on your display or terminal. Of course, if you type during
output, the output display will have the input characters interspersed
in it. However, whatever you type will be saved and interpreted in
the correct sequence. There is a limit to the amount of read-ahead,
but it is generous and not likely to be exceeded unless the system is
severely overloaded or operating abnormally. When the read-ahead
limit is exceeded, the system throws away all the saved characters.
stty(1) tells you how to describe the characteristics of your terminal
to the system. profile(4) explains how to accomplish this task
automatically every time you log in.
Special Interactive Characters [Toc] [Back]
A number of special characters are used to control the input and
output of your terminal. These characters have defaults and can be
redefined with the stty command (see stty(1)).
______________________________________________________________
stty Default At Login Common
Name Character (ASCII Name; Key Names) Redefinition
______________________________________________________________
eof ^D (EOT)
erase # ^H (BS; Backspace)
kill @ ^U (NAK), ^X (CAN)
intr ^? (DEL; Delete, Rub, Rubout) ^C (ETX)
quit ^\ (FS)
start ^Q (DC1; X-ON)
stop ^S (DC3; X-OFF)
______________________________________________________________
Hewlett-Packard Company - 7 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
The eof character terminates "file" input from the terminal, as read
by programs and scripts. By extension, eof can also terminate the
shell (see the Logging Out subsection above).
The kill character deletes all characters typed before it on a
terminal input line. The erase character erases the last character
typed. Successive uses of erase will erase characters back to, but
not beyond, the beginning of the input line.
The intr character generates an interrupt signal that bypasses the
input buffer. This signal generally causes whatever program you are
running to terminate. It can be used to stop a long printout that you
don't want. However, programs can arrange either to ignore this
signal altogether, or to be notified when it happens (instead of being
terminated). For example, the vi editor catches interrupts and stops
what it is doing, instead of terminating, so that an interrupt can be
used to halt an editing operation without losing the file being
edited.
The quit character generates a quit signal that bypasses the input
buffer and most program traps and causes a running program to
terminate. It can cause a core dump in the current directory.
The stop character can be used to pause output to the terminal. It is
commonly used on video terminals to suspend output to the display
while you read what is already being displayed. You can then resume
output by typing the start character. When stop and start are used to
suspend or resume output, they bypass the keyboard command-line buffer
and are not passed to the program. However, any other characters
typed on the keyboard are saved and used as input later in the
program.
The eof, erase, and kill characters can be used as normal text
characters if you escape them with a preceding \, as in \^D.
Therefore, to erase a \, you need two erases.
The intr, quit, start, and stop characters cannot be escaped on the
input line.
End-of-Line and Tab Characters [Toc] [Back]
Besides adapting to the speed of the terminal, HP-UX tries to be
intelligent as to whether you have a terminal with a newline (line-
feed) key, or whether it must be simulated with a return/line-feed
character pair. In the latter case, all incoming return characters
are changed to line-feed characters (the standard line delimiter), and
a return/line-feed pair is echoed to the terminal. If you get into
the wrong mode, use the stty command to correct it (see stty(1)).
Tab characters are used freely in HP-UX source programs. If your
terminal does not have the tab function, you can arrange to have tab
characters changed into spaces during output, and echoed as spaces
Hewlett-Packard Company - 8 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
during input. The stty command sets or resets this mode. By default,
the system assumes that tabs are set every eight character positions.
The tabs command (see tabs(1)) can set tab stops on your terminal, if
the terminal supports tabs.
How to Run a Program [Toc] [Back]
When you have successfully logged into HP-UX, the shell monitors input
from your terminal. The shell accepts typed lines from the terminal,
splits them into command names and arguments, then executes the
command. The command can be the name of a shell built-in, an
executable script of commands, or an executable program. There is
nothing special about system-provided commands, except that they are
kept in directories where the shell can find them. You can also keep
commands in your own directories and arrange for the shell to find
them there.
The command name is the first word on an input line to the shell; the
command and its arguments are separated from one another by blanks
(one or more space and/or tab characters).
When a program terminates, the shell ordinarily regains control and
prompts you to indicate that it is ready for another command. The
shell has many other capabilities, which are described in detail in
the appropriate manpages: sh-posix(1) for the POSIX shell, ksh(1) for
the Korn shell, or csh(1) for the C shell.
The Current Directory [Toc] [Back]
HP-UX has a file system arranged in a hierarchy of directories. When
the system administrator gave you a user name, he or she also created
a directory for you (ordinarily with the same name as your user name,
and known as your login or home directory). When you log in, that
directory becomes your current or working directory, and any file name
you type is assumed to be in that directory by default. Because you
are the owner of this directory, you have full permission to read,
write, alter, or destroy its contents. The permissions you have for
other directories and files will have been granted or denied to you by
their respective owners, or by the system administrator. To change
the current working directory use cd(1).
Path Names [Toc] [Back]
To refer to files not in the current directory, you must use a path
name. Full (absolute) path names begin with /, which is the name of
the root directory of the whole file system. After the slash comes
the name of each directory containing the next subdirectory (followed
by a /), until finally the file name is reached (for example,
/usr/ae/filex refers to file filex in directory ae, while ae is itself
a subdirectory of usr; usr is a subdirectory of the root directory).
See glossary(9) for a formal definition of path name.
If your current directory contains subdirectories, the path names of
files in them begin with the name of the corresponding subdirectory
Hewlett-Packard Company - 9 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
(without a prefixed /). Generally, a path name can be used anywhere a
file name is required.
Important commands that modify the contents of directories are cp, mv,
and rm which respectively copy, move (that is, rename, relocate, or
both), and remove files. To determine the status of files or the
contents of directories, use the ls command. Use mkdir to make
directories, rmdir to destroy them, and mv to rename them (see cp(1),
ls(1), mkdir(1), mv(1), rm(1), and rmdir(1)).
Writing a Program [Toc] [Back]
To enter the text of a source program into an HP-UX file, use a text
editing program such as vi, ex, or ed (see vi(1), ex(1), and ed(1)).
The three principal languages available under HP-UX are C (see
cc_bundled(1) and cc(1)), FORTRAN (see f77(1)), and Pascal (see
pc(1)). After the program text has been entered with the editor and
written into a file (whose name has the appropriate suffix), you can
give the name of that file to the appropriate language processor as an
argument. Normally, the output of the language processor will be left
in a file named a.out in the current directory. Since the results of
a subsequent compilation may also be placed in a.out, thus overwriting
the current output, you may want to use mv to give the output a unique
name. If the program is written in assembly language, you will
probably need to link library subroutines with it (see ld(1)).
FORTRAN, C, and Pascal call the linker automatically.
When you have gone through this entire process without encountering
any diagnostics, the resulting program can be run by giving its name
to the shell in response to the prompt.
Your programs can receive arguments from the command line just as
system programs do by using the argc and argv parameters. See the
supplied C tutorial for details.
Text Processing [Toc] [Back]
Almost all text is entered through a text editor. The editor
preferred above all others provided with HP-UX is the vi editor. For
batch-processing text files, the sed editor is very efficient. Other
editors are used much less frequently. The ex editor is useful for
handling certain situations while using vi but most other editors are
rarely used except in various scripts.
The following editors are the same program masquerading under various
names: vi, view, and vedit (see vi(1)) and ex and edit (see ex(1)).
For information about the sed stream editor, see sed(1). The ed line
editor is described in ed(1).
The commands most often used to display text on a terminal are cat,
more, and pr (see cat(1), more(1), and pr(1)). The cat command simply
copies ASCII text to the terminal, with no processing at all. The
more command displays text on the terminal a screenful at a time,
Hewlett-Packard Company - 10 - HP-UX 11i Version 2: August 2003
introduction(9) introduction(9)
pausing for an acknowledgement from the user before continuing. The
pr command paginates text, supplies headings, and has a facility for
multicolumn output. pr is most commonly used in conjunction with the
lp command (see lp(1)) to pipe formatted text to a line printer.
Interuser Communication [Toc] [Back]
Certain commands provide interuser communication. Even if you do not
plan to use them, it could be beneficial to learn about them, because
someone else may direct them toward you. To communicate with another
user that is currently logged in, you can use write to transfer text
directly to that user's terminal display (if permission to do so has
been granted by the other user). Otherwise, elm, mailx, or mail (in
order of ease of use) can send a message to another user's mailbox.
The user is then informed by HP-UX that mail has arrived (if currently
logged in) or mail is present (when the user next logs in). Refer to
elm(1), mail(1), mailx(1), and write(1) for explanations of how these
commands are used.
ACKNOWLEDGEMENTS [Toc] [Back]
UNIX(R) is a registered trademark of The Open Group.
SEE ALSO [Toc] [Back]
cat(1), cc_bundled(1), cd(1), chsh(1), cp(1), csh(1), ed(1), ex(1),
ksh(1), ld(1), login(1), lp(1), ls(1), mail(1), mailx(1), man(1),
mkdir(1), more(1), mv(1), passwd(1), pr(1), rm(1), rmdir(1), sed(1),
sh(1), sh-posix(1), stty(1), tabs(1), vi(1), write(1), a.out(4),
profile(4), glossary(9).
Web access to HP-UX documentation at http://docs.hp.com.
Hewlett-Packard Company - 11 - HP-UX 11i Version 2: August 2003 [ Back ] |