LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   One more "export" question (https://www.linuxquestions.org/questions/linux-general-1/one-more-export-question-4175423590/)

Mr. Alex 08-23-2012 06:53 AM

One more "export" question
 
If there is
Code:

PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
export PATH

in /etc/profile, is it OK to make it
Code:

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
to make config shorter?

byannoni 08-23-2012 06:59 AM

Yes, as long as it isn't modified between the original two lines.

Mr. Alex 08-23-2012 07:05 AM

How's that? Is wasn't one line originally after installation.

byannoni 08-23-2012 07:17 AM

Quote:

Originally Posted by Mr. Alex (Post 4762022)
How's that? Is was't one line originally after installation.

I'm not sure what you mean by that, but based on your previous post, you should be fine.

chrism01 08-23-2012 08:21 PM

I agree its not a clear qn, but the point byannoni was making/hinting at is that several files are called during a login process and any/all(!) of them can set/rest env vars, including PATH.
Files include (but are not limited to)
/etc/profile (&/or see /etc/profile.d)
/etc/bashrc
.bashrc
.bash_profile

'not limited to' means that they can all call other files which can set env vars ...


All times are GMT -5. The time now is 02:01 AM.