LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 02-11-2003, 09:26 PM   #1
billkris
LQ Newbie
 
Registered: Jan 2003
Location: Burlington, ON Canada
Distribution: RH8
Posts: 26

Rep: Reputation: 15
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
 
Old 02-11-2003, 09:28 PM   #2
rohang
Member
 
Registered: Aug 2002
Location: Sydney, Australia
Distribution: Redhat, Open BSD, SuSe, Debian, CentOS
Posts: 177

Rep: Reputation: 31
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
 
Old 02-11-2003, 09:29 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
custom startup commands, look for rc.local, maybe in /etc/rc.d

Cool
 
Old 02-11-2003, 09:36 PM   #4
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
I adjust my path in .bash_profile. So what's the difference between .bash_profile and .bashrc?
 
Old 02-11-2003, 09:39 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 02-11-2003, 09:40 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 02-11-2003, 10:15 PM   #7
importboy03
Member
 
Registered: Feb 2003
Location: NorthEast
Distribution: RH 8.0
Posts: 34

Rep: Reputation: 15
/root/.bash_profile is for root
/home/userx/profile is for userx

Hope that help.
 
Old 02-11-2003, 10:30 PM   #8
billkris
LQ Newbie
 
Registered: Jan 2003
Location: Burlington, ON Canada
Distribution: RH8
Posts: 26

Original Poster
Rep: Reputation: 15
Thanks for all the input. I'll check them all out.

Bill
 
  


Reply



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
PATH statement from file granny Linux - Newbie 8 04-21-2005 12:58 PM
Adding directories to the PATH statement kaplan71 Slackware 2 09-02-2004 03:57 PM
please tell me if my path statement is correct on RH 7.3 ergo_sum Linux - Newbie 9 12-12-2003 11:41 PM
PATH statement editing? cottonmouth Linux - General 2 08-17-2003 08:00 PM
need perl fuction like c #include statement for header file mrtwice Programming 5 06-19-2003 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration