Re: export PATH (newbie question)

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

 



At 01:18 10/19/2003, you wrote:
I'm not going to touch the feminist jokes that could be made about "man
bash"-ing  ;)  Seriously though, I did glance at it earlier (and more
in-depth now), and it is suffering from a serious case of TMI (too
doggone much information...)  Trying to find the pertinent paragraph in
the manual is almost impossible...  <sigh...>

Definitely so. But once you know that there is that much information in there, quickly searching through it for shell-related stuff is quite valuable.


Well... yes and no.  First of all, you solved my initial problem.  I
can add whatever path I want to either /etc/bashrc (global) OR
/home/smearp/.bashrc (local) OR /etc/profile (global again), by typing
either: export PATH=$PATH:/some/path   or  alias prog='/path/to/program'

You forgot ~/.profile. <grin>


The reason there are several files is that you want to have the ability to do global or per-user stuff, and some things are related to the particular shell you're using and some are not. I just don't remember exactly which was the "non-shell-related" file (maybe /etc/profile and ~/.profile), and since I always run bash I tend to stick things like aliases in my .bashrc or /etc/bashrc as appropriate.

I also superstitiously tend to not want to muck with the path, simply because I don't understand too well where/when/how it is set or modified like you. The only time I modify a path is to add something like ~/bin to the path, where I know I will be placing lots of executable files. Also, it is suggested that you always put additional directories AT THE END of the path since the OS searches for the command or executable in each directory in the path, using the first one it finds. This is so that no one can put a fake "ls" executable in your executables directory and trash your system the next time you want to list a directory.


-- Rodolfo J. Paiz rpaiz@xxxxxxxxxxxxxx


-- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux