1839506 Members
3253 Online
110146 Solutions
New Discussion

UNIX default PATH

 
Nick_28
New Member

UNIX default PATH

Does anyone know where to find and change the default system PATH for HP-UX?
7 REPLIES 7
Mark Greene_1
Honored Contributor

Re: UNIX default PATH

it is set in /etc/profile, but you make your changes to /etc/PATH and /etc/MANPATH

HTH
mark
the future will be a lot like now, only later
A. Clay Stephenson
Acclaimed Contributor

Re: UNIX default PATH

Hi Nick:

1) You can edit the file /etc/PATH.
2) Modify /etc/profile
3) Modify the .profile (or .cshrc) of the user.
If it ain't broke, I can fix that.
Helen French
Honored Contributor

Re: UNIX default PATH

Hi,

Try these files - /etc/PATH, /etc/profile ( default global profile for 'sh'), /etc/csh.login ( profile for C shell), /$home/.profile ( user profile for 'sh').

HTH,
Shiju
Life is a promise, fulfill it!
Sanjay_6
Honored Contributor

Re: UNIX default PATH

Hi Nick,

you should look for changing the default path in /etc/profile if you want to implement the change for all the users.

add this line to your /etc/profile,

export PATH=$PATH:new_path_1:new_path_2

Hope this helps.

Regds
James R. Ferguson
Acclaimed Contributor

Re: UNIX default PATH

Hi Nick:

I'd add this reminder, too: Keep your PATH variable as short as practical. Place frequently accessed directories at the head (beginning), and *do not* include your current path (".") in the PATH. This last one constitutes a classic Trojan horse. That is, you may not be executing what you think you are running. Rather you are running *my* destructive code that masquerades as the name of a normal command!

Regards!

...JRF...
Wodisch
Honored Contributor

Re: UNIX default PATH

Jim: *you* have destructive code??? ;-)
James R. Ferguson
Acclaimed Contributor

Re: UNIX default PATH

Hi Wodisch!

Me? Naw...I tend to be too much of a pack-rat. :-))

Regards!

...JRF...