Environment Variables
tcsh maintains a set of environment variables , which are distinct from shell variables and aren’t really part of the shell. Shell variables are meaningful only within the currently running shell, but environment variables are exported automatically, making them available to other programs run by the shell. For example , shell variables are accessible only to the particular script in which they’re defined, whereas environment variables can be used by any shell scripts, mail utilities, or editors you might invoke.
Environment variables are assigned as follows:
setenv VAR valueBy convention, environment variable names are all uppercase. You can create your own environment variables, or you can use the predefined environment variables that follow.
The following environment variables have corresponding tcsh shell variables. When either one changes, the value is copied to the other.
|
|
Alternative to local user for
Kerberos authentication with |
|
|
User’s group name; same as
|
|
|
Home directory; same as home. |
|
|
Search path for commands; same as
|
|
|
Number of nested shell levels;
same as |
|
|
Terminal type; same as |
|
|
User’s login name; same as
|
Other environment variables, which do not have corresponding shell variables, include the following:
|
|
Number of columns on terminal. |
|
|
Identifies user’s display for the X Window System. If set, the ... |
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