1833055 Members
2473 Online
110049 Solutions
New Discussion

Re: profile

 
Manuales
Super Advisor

profile

what are main variables for being located into .profile file?

thanks.
5 REPLIES 5
Jaime Bolanos Rojas.
Honored Contributor

Re: profile

Manuales,

It looks like it's totally up to your needs:

".profile files are useful for setting various environment parameters, setting terminal modes, or overriding some or all of the results of executing /etc/profile"

For more info and example of file please take a look at:

http://docs.hp.com/en/B2355-60130/profile.4.html

Regards,

Jaime.
Work hard when the need comes out.
Yogeeraj_1
Honored Contributor

Re: profile

hi,

For our Oracle Environments, we consider the following important:

PATH
TMP
TMPDIR
ORACLE_HOME
ORACLE_SID
LD_LIBRARY_PATH
DISPLAY

hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Pete Randall
Outstanding Contributor

Re: profile

The .profile file should contain only things that need to be set differently for indiviual users. This should be very little if any.

Everything else should go into /etc/profile so that you have a common base.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: profile

Hi Manuales:

You can populate your '.profile' with whatever variables are appropriate to you environment.

However, instead of adding them directly therein, I prefer to source a separate file containing them. In that way, _any_ script that needs the custom environmental variables can also source (read) the file _without_ having to source the '.profile'. This eliminates having to conditionally exclude the 'stty' handling for non-interactive uses.

As the end of the profile, simply do:

. ${HOME}/myenv

That is a dot ("." followd by a whitespace (space or tab), followed by the name of the file that contains the environmental variables you want to declare.

Regards!

...JRF...
Jov
Honored Contributor

Re: profile

Hi

Doe a man on 'ksh', it should details most if not all the possible evironment variables for .profile.

Keep in mind if you're using .profile for Bourne shell, it'll be a subset of it.


Jov