Computing.Net > Forums > Linux > Set 'PATH' & 'CLASSPATH'..

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Set 'PATH' & 'CLASSPATH'..

Reply to Message Icon

Name: queryanalyzer
Date: November 12, 2003 at 06:59:18 Pacific
OS: RH 8.0
CPU/Ram: 256mb
Comment:

Hi..
HOw can i set 'PATH' & 'CLASSPATH' variable during startup, so that its remains set for all sessions.
I'm running RH 8.0 and i tried to include this line in my /etc/rc.d/rc.local file...
export PATH=$PATH:new_path

Its a 'bash' shell.
But this didnt seem to do the magic.

Thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: taurus
Date: November 12, 2003 at 08:14:08 Pacific
Reply:

No, no, no... You're supposed to set that in either /etc/bashrc or ~/.bashrc, not in /etc/rc.d/rc.local!!! Be careful what you add in /etc/rc.d/rc.local because it can crash your system...

taurus


0

Response Number 2
Name: queryanalyzer
Date: November 12, 2003 at 09:05:59 Pacific
Reply:

Can i also put it in /etc/profile ??

Thanks.


0

Response Number 3
Name: Jared Felton
Date: November 12, 2003 at 09:41:44 Pacific
Reply:

Yes, you can put it in /etc/profile

That's where i have my path and classpath set.

Beginning comments of my /etc/profile that came with redhat 9:

# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

Putting it in ~/.bashrc would only set it for that one user.


0

Response Number 4
Name: queryanalyzer
Date: November 12, 2003 at 10:57:13 Pacific
Reply:

Thanks guys !!


0
Reply to Message Icon

Related Posts

See More


How do X work with laptop... Linux for an old comp



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Set 'PATH' & 'CLASSPATH'..

Setting Path and ClassPath www.computing.net/answers/linux/setting-path-and-classpath/13795.html

setting path in rc.sysinit www.computing.net/answers/linux/setting-path-in-rcsysinit/19084.html

set path www.computing.net/answers/linux/set-path/12104.html