LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I change the $PATH to what I want permantly (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-change-the-%24path-to-what-i-want-permantly-205786/)

who_cares 07-16-2004 07:06 AM

How do I change the $PATH to what I want permantly
 
I got the adobe plugin for mozilla 1.4.1 I have fedora core release 1 and it says I must have acroread in my path. the path is /usr/local/Acrobat-5/bin, I used the PATH="$PATH /usr/local/Acrobat-5/bin" at the command line echoed the $PATH and it was there. I rebooted and done a $PATH echo and it werent there. I used the symlink method instead and I can read PDF documents happily, but I would still like to know how I can change the $PATH permantly in case I may have to in the future:cry:

trickykid 07-16-2004 07:07 AM

Add it to your .bashrc or .bash_profile or /etc/profile for users globally.

who_cares 07-18-2004 08:45 AM

cheers tricky seemed to do the trick:D

mfazi1612 07-20-2004 07:47 AM

Hi, just following up from this post. When I opened my bashrc to add the line, it said:

# PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes
# will be lost during system upgrades. Instead use /etc/bash.bashrc.local
# for your local settings, favourite global aliases, VISUAL and EDITOR

I couldn't find the .local file. Is this something I have to create? If so, do I just copy the original bashrc, and how do I get the system to look for this .local file instead of the original?

who_cares 07-20-2004 09:05 AM

just use etc/profiles files
 
Go into the etc folder select the profiles file choose to open with your favourite text editor.

You will see a a series of pathmunge statements this is a variable to set up your paths. they all start with a ;

Just after these without the comma (choose) a blank line put:

Pathmunge /your/path

This should work it did for me.

You will have to reboot to see the results in an echo $PATH at the command line.:D

mfazi1612 07-20-2004 09:31 AM

Hi,

But that will edit the profile. As the script says in my post before, upgrades could affect the profile so don't change that, instead change the profile.local.

I assume this means, upon upgrades, your profile could change so instead put your paths in a local version of your profile. I couldn't find this local version and was wondering how do I find it/set it up?

Thanks.

mikshaw 07-20-2004 09:50 AM

You can create it...it's just a text file.
Another option is copy /etc/bashrc(or bash_profile) to $HOME/.bashrc(or .bash_profile) and edit it to your pleasure. This leaves the system-wide settings untouched, and any upgrades won't affect your personal settings. I prefer doing this because 1) I can't screw up too severely by messing with system-wide settings, and 2) every user of the system can have his own choice of setting which can be easily backed up and transferred to other systems.

mfazi1612 07-20-2004 09:56 AM

Thanks

320mb 07-20-2004 10:10 AM

Quote:

Originally posted by mfazi1612
Hi,

But that will edit the profile. As the script says in my post before, upgrades could affect the profile so don't change that, instead change the profile.local.

I assume this means, upon upgrades, your profile could change so instead put your paths in a local version of your profile. I couldn't find this local version and was wondering how do I find it/set it up?

Thanks.

just make a back up of the file/files!!!
if something odd happens during an upgrade........just restore it..............easy


All times are GMT -5. The time now is 11:37 AM.