- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Setting environment variables
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 06:17 AM
04-17-2001 06:17 AM
As an example, I have perl in /opt/perl5 and would like to make this available from everywhere...
Thank you,
Pete
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 06:23 AM
04-17-2001 06:23 AM
Re: Setting environment variables
export VALUE=whatever
#echo $VALUE
whatever
(setenv in csh)
this will ensure that your shell will set them up even if you fork other shells.
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 06:33 AM
04-17-2001 06:33 AM
SolutionEDITOR=vi
LANG=c
HISTSIZE=201
HISTFILE=$HOME/.sh_history
ORGANIZATION="Genzyme Biosurgery"
LPDEST=RRA106
export EDITOR LANG HISTSIZE HISTFILE ORGANIZATION LPDEST
Now any window you open will have these variables set. Hope this helps.
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 06:36 AM
04-17-2001 06:36 AM
Re: Setting environment variables
you will see the value xxx in the parent and all child shells or processes. However, if you
set MYVAR=yyy in a child process and export it, the parent will still see the value 'xxx'.
If you really need bidirectional setting of
values you will need to use files or pipes.
For simple things like PATH, you can use the .profile's for each user or if it truly global set a value in /etc/profile. /etc/profile can be used to set a variable and export it to everyone. You can also define global PATH's and MANPATH's by setting them in /etc/PATH and /etc/MANPATH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 06:40 AM
04-17-2001 06:40 AM
Re: Setting environment variables
There's a few global environment files that are available in /etc which you can use to set an environment globally for all users (at least, from what I can see in HP/UX 11.00...):
/etc/PATH : Set global PATH parameter
/etc/MANPATH : Set global MANPATH parameter
/etc/SHLIB_PATH : Set global shared library PATH
/etc/profile : Generic system-wide profile. Normally kept to the bare minimum of what every user needs. /etc/profile normally sources /etc/PATH and /etc/MANPATH.
Follow the same steps (for exporting the variable) that Bill shows above. In /etc/profile, this is for /usr/bin/sh initialization, so no C shell here!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 07:47 AM
04-17-2001 07:47 AM
Re: Setting environment variables
If you modify the .profile and are using CDE, you need to make sure the DTSOURCEPROFILE=TRUE in the .dtprofile. This cause the .profile to be read when you open a terminal.
...jcd...