Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-07-2007, 11:09 PM   #1
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Rep: Reputation: 30
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc

Hi guys,

how do I set path permanently in Linux?

currently I set it in /etc/profile by adding the following lines at the end (to include my apache)

export PATH
But it seems like I can set in ~./bashrc or /etc/bashrc
so I am a bit confused now...

Old 08-07-2007, 11:59 PM   #2
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
The etc files are global - affects all users using that shell. The $HOME files are personal - affects only you. Read the bash manual page on 'invocation' for which bash files do what - basically, your profile will be read by login shells (and even by some non-bash but Bourne-like shells) whereas bashrc is read by interactive non-login shells.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/profile V.S. /etc/bashrc Takayuki Linux - General 12 05-18-2011 12:25 AM
/etc/profile vs /etc/bashrc maybbach Linux - Newbie 6 04-22-2005 10:50 AM
Editing path permanently...but I don't have .bashrc or .profile shock_ez Linux - Newbie 6 07-02-2003 06:16 PM
Where's my .bashrc or .profile t1mc00per Linux - Software 6 03-03-2003 11:35 AM
.bashrc,profile.local Cichlid Linux - Distributions 1 01-08-2002 06:22 AM

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration