[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Effect of `export PATH' not pemanent?

Rodolfo Medina wrote:

> I do:
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
> , then
> $ export PATH="$PATH:/sbin"
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin
> and everything all right; but the effect of `export PATH'
> is not permanent: after a while, or in another terminal, again:
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
> . How to make the effect of `export PATH' permanent,
> and why is it not?

Clive Menzies wrote:

> Check out .bashrc and .bash_profile in your home directory.  See man
> bash

Digby R. S. Tarvin wrote:

> You are making a change to the shell's environment which will
> effect all of its subsequent descendants, but not processes
> started either before the change or by ancestors (such as your
> window manager..) - and certainly not for a different login
> session.
> To make it permanent and apply to all of your shells, you need
> to modify the command files that are executed when you login or
> when each new shell starts. Check the man page appropriate for
> your chosen shell for details.

Adam Funk <a24061@yahoo.com> writes:

> Put
> export PATH="$PATH:/sbin"
> in your ~/.bashrc file.

Ron Johnson <ron.l.johnson@cox.net> writes:

> You are confusing "permanent" with "spanning processes".  Unix (or
> is it Shell?) won't let you affect other process' "symbol space".
> As others have written, each shell instance must export PATH.

Thanks to all for your help.

Reply to: