Set Environment Variable

Sean Sieger sean.sieger at gmail.com
Sun Jul 10 23:57:23 UTC 2005


"ZIYAD A. M. AL-BATLY" <zamb at saudi.net.sa> writes:

> On Sun, 2005-07-10 at 16:01 -0400, Sean Sieger wrote:
>> I have added
>> 
>> PATH=$PATH:~/bin
>> 
>> to .bashrc; when I add ~/bin to my path in 'profile', do I not need it in
>> .bashrc any longer? Well, that will be what I be looking into. Thank you
>> for the answer -- it appears, for my needs, to be the correct answer.
>> 
>> Thank you, Robbo.
>> --
>> Sean
>> 
> This subject has been discussed a lot latelay in this list (I'm not
> bashing you for asking as it's your right to do so).
>
> There are two types of shells: "login" and, will, "non-login" shells.
>
> In login shells, it always reads "/etc/profile" then "~/.bash_profile",
> "~/.bash_login", and "~/.profile" (in that order as long as they exist
> and *stops* after the first one found and readable).
>
> In non-login shells, it reads "/etc/bash.bashrc" and "~/.bashrc".
>
> "login" shells are the one that start with the argument "--login" passed
> to them.  "initd" do that for the console shells.  In "gnome-terminal"
> you need to check some option to make the shell a "login" one.
> "non-login" shell are the normal shell you start by running
> "gnome-terminal" or "xterm" (assuming you didn't change the default
> options).
>
> Also, in most cases you need to "export" the variable for it to take
> effect.  e.g.:
>         PATH="$PATH:~/bin"
>         export PATH
>
> I hope this clears thing for you.
> Ziyad.
>
Awesome. Now, under the Subject Line 'Set Environment Variable' (one
more word, PATH, seemed to make it too long), there is a thread that can
be _found_ that answers this question. Is it me, or is the List Archive
searchable? I scanned the July Archive and there may be mention of
$PATH but it doesn't jump out in any subject line. I am pretty familiar
with those archives, I make it my business, so I know I can go to them
to find answers...

When I asked it I was already tired of _Searching_(?) documentation at
Ubuntu.Org. It is new documentation, and not polished, but I have never
been able to find answers there (unless of course, someone has posted a
link and then I think, 'What a goldmine of information.')

Tom mentioned 'list etiquette' in an adjacent thread today. His comment
was prompted by top posting. You know what? We, even the newest, are
building some important documentation for an important GNU/Linux
distribution and well-formed threads are... Top posting is smack! That
was gentle of Tom, but we all need to stay off the top of threads
and remind each other to do so. Foolish subject lines, "I'm an Upset
Newbie" are, I don't know, damaging? Will any of us scan and scan and
scan the archives and stop, thinking, 'Oh, that long thread titled,
"I'm an Upset Newbie" probably holds my answer.'?
-- 
Sean Sieger




More information about the ubuntu-users mailing list