Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Customizing your .profile z/OS UNIX System Services User's Guide SA23-2279-00 |
|
When you start the z/OS shell, it uses information in three files to determine your particular needs or preferences as a user. The files are accessed in this order:
Settings established in a file accessed earlier can be overwritten by the settings in a file accessed later. The /etc/profile file provides a default system-wide user environment. The systems programmer can modify the variables in this file to reflect local needs (for example, the time zone or the language). If you do not have an individual user profile, the values in the /etc/profile are used during your shell session. The $HOME/.profile file (where $HOME is a variable for the home directory for your individual user ID) is an individual user profile. Any values in the .profile file in your home directory that differ with those in the /etc/profile file override them during your shell session. z/OS provides a sample individual user profile. Your administrator may set up such a file for you, or you may create your own. Typically, your .profile might contain the following: Figure 1. A sample .profile
If the value on the right-hand side of the = sign does not contain spaces, tab characters, or other special characters, you can leave out the single quotation marks. Each of the lines begins with an export command.
For the z/OS shell,
this sets the variable and also
specifies that whenever a subshell is created, these variables should
be exported to it. You can also set a variable on one line and export
it on another, as shown here:
If portability to a Bourne shell is a consideration,
use the two-line syntax. See Exporting variables for
more information about exporting variables.
Tip: If you create a subshell with the command sh –L, the shell starts and reads and executes your profile file. Note that the letter L must be in uppercase. The shell looks for .profile in the $HOME directory. If it is not found, the shell looks in the working directory; therefore, make sure that you are working in the right directory when you enter this command. |
Copyright IBM Corporation 1990, 2014
|