Your .profile File


      If you are using the Korn Shell, there is only one file that is immediately relevant. This file is the ~/.profile file. This file is run only for login shells, that is, a shell which is run when you first log in or when you create a new terminal window under XWindows. Shells that are run when you run a shell script or simply type ksh at the prompt are not login shells and do not run the .profile file. The .profile file issued with your EWS account contains only one executed line:

. /usr/local/ews/system.profile

      This command executes the commands and definitions found in the file /usr/local/ews/system.profile. These commands set up the working environment. Note that this is not the same throughout all machines in the EWS labs - each type of system (i.e., Sun or HP) has its own /usr/local/ews/system.profile, so if you log into a Sun, you do not run the same file as when you log into an HP. These different files allow us to account for minor differencesin the various operating systems.

Modifying
Your
.profile

      If you modify the .profile file, you must be careful to take into account differences between the different systems. Failure to do so can result in problems using a particular type of system.

      In other words, do not place HP-specific commands in your .profile file, for if you ever log into a Sun system, you may find that the command either does not work at all or does not have the same effect or, even worse, has a destructive effect.

      To account for these differences, the /usr/local/ews/system.profile file defines an environment variable called ENVIRON to be the type of system you are running on. It can take values of SUN or HPUX, depending on what type of system you are using.

Note: YOU MUST LEAVE THE LINE . /usr/local/ews/system.profile IN YOUR .profile FILE FOR THE ENVIRON VARIABLE TO BE DEFINED.

Sample
.profile

      Here's an example of a modified .profile file. In this file, the user wishes to make changes to his path and create a few aliases, but, because of differences in machines, he must take into account which machine he is logging in to.

#Sample .profile file
#
#
export PATH=$PATH:/local/apps3/prolog/bin3.1.1/rs6000
alias plist="ps -ef"
#OK, we're all done!
#


Back to the table of contents