Personal tools
You are here: Home Docs Help! Reference Manuals Bash Guide for Beginners The Bash environment Variables Reserved variables Bourne shell reserved variables

3.2.4.1. Bourne shell reserved variables

Up one level
-

Bash uses certain shell variables in the same way as the Bourne shell. In some cases, Bash assigns a default value to the variable. The table below gives an overview of these plain shell variables:

Table 3-1. Reserved Bourne shell variables

Variable name Definition
CDPATH A colon-separated list of directories used as a search path for the cd built-in command.
HOME The current user's home directory; the default for the cd built-in. The value of this variable is also used by tilde expansion.
IFS A list of characters that separate fields; used when the shell splits words as part of expansion.
MAIL If this parameter is set to a file name and the MAILPATH variable is not set, Bash informs the user of the arrival of mail in the specified file.
MAILPATH A colon-separated list of file names which the shell periodically checks for new mail.
OPTARG The value of the last option argument processed by the getopts built-in.
OPTIND The index of the last option argument processed by the getopts built-in.
PATH A colon-separated list of directories in which the shell looks for commands.
PS1 The primary prompt string. The default value is "'\s-\v\$ '".
PS2 The secondary prompt string. The default value is "'> '".
(no ads!)