This section describes some of the more commonly used environment variables. Many of these variables may already be in your user profile. As previously mentioned, your user profile file (.profile for the Bourne and Korn shells and .cshrc for the C shell) is located in your home directory.
Hidden ("dot") files can be listed by typing ls -la.
The following is a partial list of environment variables that can be included in your user profile. The syntax for defining environment variables depends on the shell you're using:
CDPATH
- Specifies the directories to be searched when a unique directory name is typed without a full path name.
HISTORY
- Sets the number of commands available to the history command (for the C shell only).
HOME
- Defines the absolute path to your home directory. The system uses this information to determine the directory to change to when you type the cd command with no arguments.
LANG
- Specifies the local language. Appropriate values are: Japanese, German, French, Swedish, and Italian.
LOGNAME
- Defines your login name. The default for this variable is automatically set to the login name specified in the passwd database as part of the login process. See System Administration Guide for information on the passwd database.
MAIL
- Specifies the path to your mailbox. usually located in the /var/mail/username directory, where username is your login name. See Chapter 7, Using Mail, for more information on this file.
MANSECTS
- Sets the available sections of on-line man pages.
PATH
- Lists, in order, the directories that the system searches to find a program to run when you type a command. If the appropriate directory is not in the search path, you have to enter it or else type the complete path name when you enter a command.
The default for this variable is automatically defined and set as specified in your .profile file (Bourne or Korn shell), or .cshrc file (C shell) as part of the login process.
PS1
- Defines your command prompt. The default prompt for the Bourne and Korn shells is the dollar sign ($). The default prompt for the C shell is the percent sign (%). The default prompt for root in either shell is the pound sign (#).
TERMINFO
- Specifies the path name for an unsupported terminal that has been added to the terminfo database. You do not need to set this variable for default terminals in this database. See System Administration Guide, Volume II for information on the terminfo database.
TERM
- Defines the terminal you're currently using. When you run an editor, the system searches for a file with the same name as the definition of this variable. It first searches the path (if any) referenced by the TERMINFO
variable, and then the default directory, /usr/share/lib/terminfo, to determine the characteristics of the terminal. If a definition is not found in either location, the terminal is identified as "dumb."