Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-07-2008, 01:01 PM
|
#1
|
|
LQ Newbie
Registered: Jan 2008
Distribution: Slackware
Posts: 19
Rep:
|
Setting PATH variable
Situation is - I need to change system wide variable PATH and LD_LIBRARY_PATH.
Editing file ~/.bashrc works, but only with current user in current bash sesion.
I want to create my own file rc.myrc which is run somewhere in system boot.
I have created rc.myrc and currently testing it.
Running rc.myrc does not permanently change the variables, new values are only available while rc.myrc is running. After finishing rc.myrc, previous values are in place (in the same bash session).
What am I doing wrong?
Should I better put new path for example in /etc/rc.d/rc.S ?
What else scripts set PATH, besides /etc/rc.d/rc.S? (rc.S does not contain full path as it is now)
Using Slackware.
Thank you.
|
|
|
|
02-07-2008, 01:31 PM
|
#2
|
|
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware, Cross Linux from Scratch, Gentoo
Posts: 2,664
Rep: 
|
/etc/profile sets PATH system wide (i.e., for every user). ~/.bashrc works for the current user whenever a new Bash shell is spawned including the initial Bash shell on login.
|
|
|
|
02-07-2008, 02:27 PM
|
#3
|
|
Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
For normal users, you should use ~/.bash_profile and for global changes, make them in /etc/profile. If you use a distro like Red Hat, Mandriva or openSUSE, you can put global settings in an individual file which you place in the /etc/profile.d directory.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:16 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|