Variables
There are two types of variables: shell variables and environment variables. Shell variables are available only to the shell in which they are defined. Environment variables are available to the current shell and also to other processes (including subshells) that are started from the shell. By convention, shell variables are lowercase and environment variables are uppercase.
Some useful shell variables are listed in the table below.
Variable | Description |
|---|---|
| If set, automatic logout occurs after you have been inactive for an hour. If set to a number, logout occurs after that many minutes of inactivity. Some shells set autologout by default at login time. To disable, unset autologout in ˜/.cshrc. |
| A list of directories in which the shell looks for directories specified as arguments to cd or pushd. |
| If set to |
| Set by the shell to your current working directory when your directory changes. |
| A list of filename suffixes. Filenames ending with any of the suffixes are ignored for filename completion. |
| In csh, turns on filename completion. (Unnecessary for tcsh.) |
| If set, specifies the number of commands to save in the history list. |
| The pathname to your home directory. |
| If set, |
| Pathname of file to check periodically to see if ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access