LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 08-07-2007, 10:09 PM   #1
Swakoo
Member
 
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)

Code:
PATH=$PATH:/usr/local/apache2/bin
export PATH
But it seems like I can set in ~./bashrc or /etc/bashrc
so I am a bit confused now...

anyone?
 
Old 08-07-2007, 10:59 PM   #2
slakmagik
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.
 
  


Reply


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-17-2011 11:25 PM
/etc/profile vs /etc/bashrc maybbach Linux - Newbie 6 04-22-2005 09:50 AM
Editing path permanently...but I don't have .bashrc or .profile shock_ez Linux - Newbie 6 07-02-2003 05:16 PM
Where's my .bashrc or .profile t1mc00per Linux - Software 6 03-03-2003 10:35 AM
.bashrc,profile.local Cichlid Linux - Distributions 1 01-08-2002 05:22 AM


All times are GMT -5. The time now is 09:06 AM.

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