LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-06-2004, 09:29 AM   #1
Skute
Member
 
Registered: Jul 2003
Distribution: SUSE 9.0 Pro
Posts: 45

Rep: Reputation: 15
Store PATH variable permanently


Hi,

every time i boot up (using a root account, yes yes i know its bad but this is only a test machine) i have to retype some of my PATH variable

It starts off as:

/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin

And then i have todo:

export PATH=$PATH:/opt/OpenPegasus/bin:/opt/OpenPegasus/lib


Is there an easier way to commit this variable permanently? Im using SUSE 9.0

Cheers
 
Old 01-06-2004, 09:46 AM   #2
keegan
Member
 
Registered: Jan 2004
Distribution: Redhat WS and VectorLinux
Posts: 41

Rep: Reputation: 15
you can try putting PATH stuff in your .bash_profile. look here for more info.
 
Old 01-07-2004, 03:40 AM   #3
Skute
Member
 
Registered: Jul 2003
Distribution: SUSE 9.0 Pro
Posts: 45

Original Poster
Rep: Reputation: 15
Hmm, seems to be mandrake specific...

Anyone know howto accomplish the same thing on SUSE (9.0) ?

(I have no .bash_profile in my root directory, or a /etc/.profile)
 
Old 01-07-2004, 03:57 AM   #4
ashamril
Member
 
Registered: Jan 2003
Location: cyberjaya
Distribution: rh mdk deb fed suse
Posts: 99

Rep: Reputation: 15
after some googling,

depend on the "shell" you are using.
.bashrc & .profile correspond to bash
.login & .cshrc correspond to csh

bashrc and cshrc are parsed everytime a user opens up a
new shell of the corresponding type. profile and login are parsed only if
the shell is being opened because someone's logging in. So, if you modify
the PATH in profile, for example, don't expect the change to be evident when
opening an xterm. For this reason, you'll probably want to make most changes
to the bashrc or cshrc files.
 
Old 01-07-2004, 03:59 AM   #5
Skute
Member
 
Registered: Jul 2003
Distribution: SUSE 9.0 Pro
Posts: 45

Original Poster
Rep: Reputation: 15
cheers

got it in /root/.bashrc and it works fine now
 
Old 01-13-2004, 05:37 PM   #6
kleptophobiac
Member
 
Registered: Jun 2003
Distribution: Arch
Posts: 315

Rep: Reputation: 30
running slack 9.1... how do I make the change permanent to all users? I have added it to the appropriate rc. files, but my path is still wrong.
 
Old 01-13-2004, 08:35 PM   #7
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,784
Blog Entries: 1

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
For Slackware you can add it to your /etc/profile file.
 
Old 01-15-2004, 03:03 PM   #8
kleptophobiac
Member
 
Registered: Jun 2003
Distribution: Arch
Posts: 315

Rep: Reputation: 30
will that be global, not just one user?
 
Old 01-15-2004, 04:05 PM   #9
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
if it's in /etc it's global
if it's in /home/username it's just for that user, and generally overrides the global settings for that user.
 
  


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
edit value of PATH permanently rsumbeling Linux - General 2 12-13-2004 10:57 AM
permanently adding to the path hyphenage Linux - General 12 07-16-2003 01:14 AM
setting PATH permanently evian Linux - Software 3 03-14-2003 11:29 AM
How to set variable permanently in rc.local(RH7.3)? beep_beep Linux - General 7 09-25-2002 12:35 PM
How to set PATH permanently chandhru Linux - Newbie 3 09-24-2002 12:43 AM


All times are GMT -5. The time now is 06:47 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