LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   What file hold the PATH statement (https://www.linuxquestions.org/questions/linux-general-1/what-file-hold-the-path-statement-45021/)

billkris 02-11-2003 09:26 PM

What file hold the PATH statement
 
As a newbie I have not been able to figure out in what file the PATH variable is set.

Also, what file should contain custom startup commands?

Bill

rohang 02-11-2003 09:28 PM

Depending on what shell you use (RH 8 uses BASH by default) it will be in your .rc file. E.G. for BASH, you'll set it in your .bashrc file which resides in your home directory.

Here's my path statement from my .bashrc

PATH=$PATH:$HOME/bin:/usr/local/bin:/usr/bin:/sbin:/usr/local/sbin:/usr/sbin:/usr/games

MasterC 02-11-2003 09:29 PM

custom startup commands, look for rc.local, maybe in /etc/rc.d

Cool

GtkUser 02-11-2003 09:36 PM

I adjust my path in .bash_profile. So what's the difference between .bash_profile and .bashrc?

Tinkster 02-11-2003 09:39 PM

Quote:

Originally posted by GtkUser
I adjust my path in .bash_profile. So what's the difference between .bash_profile and .bashrc?
man bash
:)
.bash_profile is used if your shell is a login-shell,
.bashrc when it's not.

Cheers,
Tink

Tinkster 02-11-2003 09:40 PM

Re: What file hold the PATH statement
 
Quote:

Originally posted by billkris
As a newbie I have not been able to figure out in what file the PATH variable is set.

Bill

Look at the files in /etc/profile.d
They build up the default path, manpath
settings and some other variables :)

Cheers,
Tink

importboy03 02-11-2003 10:15 PM

/root/.bash_profile is for root
/home/userx/profile is for userx

Hope that help.

billkris 02-11-2003 10:30 PM

Thanks for all the input. I'll check them all out.

Bill


All times are GMT -5. The time now is 05:27 PM.