LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-23-2004, 04:13 AM   #1
jgoggel
LQ Newbie
 
Registered: Jul 2004
Location: Reading, UK
Distribution: Mandrake 10.0
Posts: 8

Rep: Reputation: 0
Settiing paths for bash


Hi there,
I have found out that there are many files named .bashrc.

If I want to add a PATH for example to avoid ./ when I want to compile C programs from a current directory, to which .bashrc exactly do I need to add PATH=$PATH: <whatever path>
Regards,
Jonathan
 
Old 07-23-2004, 06:12 AM   #2
pycoucou
Member
 
Registered: Apr 2004
Location: Edinburgh
Posts: 78

Rep: Reputation: 15
There is only one .bashrc called .bashrc. Another conf file for bash is .bash_profile. I know there is a slight difference between the two while one is executed for remote login and the other for local login (or something like that).

Maybe, it's what you need: to define the path in .bash_profile. To avoid to handle two similar file, I'll advise you to use a symbolic link from one to the other.
 
Old 07-23-2004, 07:14 AM   #3
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
the one in your home directory.
 
Old 07-23-2004, 08:24 AM   #4
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Rep: Reputation: 30
whansard is exactly right about your own login. To affect all users, put the same PATH=$PATH: <whatever path> code in the "/etc/profile" file.
 
Old 07-23-2004, 08:41 AM   #5
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
Quote:
If I want to add a PATH for example to avoid ./ when I want to compile C programs from a current directory
You can always use :

export PATH=$PWD:$PATH

Then run your program without ./
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: ln and relative paths tortle Programming 8 05-10-2010 05:50 AM
Changing PATHS Murdock1979 Slackware 2 07-27-2005 08:02 PM
different paths iomari Linux - General 1 11-10-2004 06:57 AM
Where are my paths? colly Linux - General 1 06-17-2004 07:15 AM
Automatically resolving WINDOWS paths to pre-configured Linux paths gazzy Linux - General 1 09-05-2003 10:15 PM


All times are GMT -5. The time now is 04:57 PM.

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