Re: Add to $PATH how?

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

 



On Sunday 04 June 2006 13:27, Fülöp Nándor wrote:
> > I've never really understood what should go in .bashrc
> > and what in .bash_profile ... ?

> (1) When you log in, the bash first checks the presence of file
> ``/etc/profile''. If it exists, the ``bash'' executes the commands listed
> in ``/etc/profile'' - if this file does not exist, bash does not mind its
> absence.
> The ``/etc/profile'' is applied for all users of your system - usually you
> may modify it as ``root''.
>
> (2) Then, the bash reads and executes the commands listed in
> `.bash_profile' being in home directory. Unlike ``/etc/profile'',
> ``.bash_profile'' is user-specific!
> As usually all ordinary users have own home directories, there are as many
> ``.bash_profile'' files as many users are in your system. E.g. if you are
> logging in as user ``root'', file ``/root/.bash_profile'' will be executed
> - if you are logging in as ``joe'', file ``/home/joe/.bash_profile'' will
> be executed (supposing that home directory of user ``joe'' is
> ``/home/joe/''), etc. So, if the different users need different settings
> after their logging in, you may do that by customizing their
> ``.bash_profile''.
>
> (3) For all further shells (after logging in), bash reads and executes the
> commands in the `.bashrc' file in the home directory of actual user.
> Commands being in this file run whenever a new shell is started except for
> the login shell. (This file is also user-specific, like ``.bash_profile''!)
>
> So, as a consequence, when you modify the files above, ``bash'' will notice
> the modification in case of new run of ``bash'' - so, the simplest way to
> assure the correctness of the modifications, log out and log in again
> immediately.

Thanks for the info.
It's not really clear to me what one would use . bashrc for;
it seems everything should go in .bash_profile .

I take it that, in Linux, a "further shell" is normally started
for each desktop?
When else would a "further shell" be started?


-- 
Timothy Murphy  
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux