POSIX 定義的環境變數

$ENV
Used only by interactive shells upon invocation; the value of $ENV is parameter-expanded. The result should be a full pathname for a file to be read and executed at startup. This is an XSI requirement.
$HOME
Home (login) directory.
使用者自己的目錄
$IFS
Internal field separator; i.e., the list of characters that act as word separators. Normally set to space, tab, and newline.
$LANG
Default name of current locale; overridden by the other LC_* variables.
$LC_ALL
Name of current locale; overrides LANG and the other LC_* variables.
$LC_COLLATE
Name of current locale for character collation (sorting) purposes.
$LC_CTYPE
Name of current locale for character class determination during pattern matching.
$LC_MESSAGES
Name of current language for output messages.
$LINENO
Line number in script or function of the line that just ran.
$NLSPATH
The location of message catalogs for messages in the language given by $LC_MESSAGES (XSI).
$PATH
Search path for commands.
執行命令時所搜尋的目錄
$PPID
Process ID of parent process.
$PS1
Primary command prompt string. Default is "$ ".
在命令列時的提示號
$PS2
Prompt string for line continuations. Default is "> ".
當命令尚未打完時,Shell 要求再輸入時的提示號
$PS4
Prompt string for execution tracing with set -x. Default is "+ ".
$PWD
Current working directory.
 
 
其他幾個有用的環境變數
$TZ
時區
$MAILCHECK
每隔多少秒檢查是否有新的信件
$MANPATH
man 指令的搜尋路徑
Web Page Copyright: 亞洲大學資訊電機學院 連耀南 yaonanlien@asia.edu.tw  env2.htm,  Thu Sep 7 16:18:51 CST 2023