Short answer is :- In every running shell arrange to execute ". /etc/profile", which "sources" the script in /etc/profile.
Long answer :- Don't follow the short answer unless you know what /etc/profile does. /etc/profile is normally run once (and once only) by the shell when it initializes. Clearly some commands that are in /etc/profile (or run by /etc/profile) may not like being run twice. Simple things line "cd $HOME" which is sometimes in /etc/profile may also not what you want to do to a running shell. Also bear in mind that you can't force changes onto a running shell - it is a simple sandbox that needs to invoke commands to change its environment, rather than have external commands change the environment from the outside. Of course all newly launched shells will use the new /etc/profile. (There is another alternative to the "short answer" and is running "exec sh" in each shell which causes a reincarnation of a new shell in the current process. This will kill any background running processes as well. So this is effectively the same as killing the old and starting a new shell) (Big disclaimer here as I am not a shell guru, but hopefully you get the gist) Martin Visser ,CISSP Network and Security Consultant Consulting & Integration Technology Solutions Group - HP Services 3 Richardson Place North Ryde, Sydney NSW 2113, Australia Phone: +61-2-9022-1670 Mobile: +61-411-254-513 Fax: +61-2-9022-1800 E-mail: martin.visserAThp.com > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Luke (Terry) > Vanderfluit > Sent: Monday, 16 August 2004 1:52 PM > To: [EMAIL PROTECTED] > Subject: [SLUG] /etc/profile > > Hi, > is there a way to activate changes made to /etc/profile other > than rebooting the box? > > I don't mean 'export PATH=$PATH:foobar' > I want a change I make to /etc/profile to become active > system wide, not just in one terminal, > > kind regards, > Luke > -- > ======================== > Luke (Terry) Vanderfluit > Mobile: 0421 276 282 > ======================== > > -- > SLUG - Sydney Linux User's Group Mailing List - > http://slug.org.au/ Subscription info and FAQs: > http://slug.org.au/faq/mailinglists.html > > -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
