Operating System - HP-UX
1748165 Members
3694 Online
108758 Solutions
New Discussion юеВ

Re: setting ENV (Environmental variables ) in HP-UX

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

setting ENV (Environmental variables ) in HP-UX

Hi

what are files used to set env varialbles like PATH, PS1 in HP-UX.
10 REPLIES 10
Ganesan R
Honored Contributor
Solution

Re: setting ENV (Environmental variables ) in HP-UX

Hi,

it will be /etc/profile and user profile.
Best wishes,

Ganesh.
Sharma Sanjeev
Respected Contributor

Re: setting ENV (Environmental variables ) in HP-UX

Hi

system wise is done in /etc/profile

for user's
$HOME/.profile

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
James R. Ferguson
Acclaimed Contributor

Re: setting ENV (Environmental variables ) in HP-UX

Hi:

You _really_ need to do some research yourself! You continue to ask fundamental questions that a bit of reading would lead you to the answer. If you have any UNIX/Linux experience you should be able to leverage that to learn more. You will learn much better by applying a little effort.

...JRF...
Steven E. Protter
Exalted Contributor

Re: setting ENV (Environmental variables ) in HP-UX

Shalom,

Assuming you use the POSIX or korn shell.

Set variables in /etc/profile and .profile

PATH=/usr/bin:/usr/contrib/bin:$PATH
export PATH

If you look at /etc/profile on an HP-UX system you will see some examples that will illuminate things.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gokul Chandola
Trusted Contributor

Re: setting ENV (Environmental variables ) in HP-UX

Hi,
You can set PATH through PATH Command.

PATH=
export PATH

After that you can check that, PATH is exported or not useing..

#echo $PATH

There you will see one more defined path by you.

Regards,
Gokul Chandola
There is always some scope for improvment.
Paul McCleary
Honored Contributor

Re: setting ENV (Environmental variables ) in HP-UX

Hi,

You might find this link useful to answer a range of questions on HP-UX that you might have:

http://docs.hp.com/en/B2355-90950/index.html

HTH, Paul
щ╗ЮчЗГ
Valued Contributor

Re: setting ENV (Environmental variables ) in HP-UX

You can set variables in /etc/profile and .profile

Regards!
Man's mind, once stretched by a new idea, never regains its original dimensions
щ╗ЮчЗГ
Valued Contributor

Re: setting ENV (Environmental variables ) in HP-UX

Hi Senthil,
here is more information..

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=997541

Regards!
Man's mind, once stretched by a new idea, never regains its original dimensions
Dennis Handly
Acclaimed Contributor

Re: setting ENV (Environmental variables ) in HP-UX

You can also set PATH from /etc/PATH:
PATH=$PATH:$(< /etc/PATH)