Where and how do you modify the path? Thanks.
Where and how do you modify the path? Thanks.
I'm gonna try and help you on this one, I think you can display your path using "echo $path" but I know for sure that the command "declare" will print out your total environment (have to scroll back a bit to see the path statement).
And then you can add/set using the "export" command if I don't remember wrong ..
:
hope it helps..
have a nice day bud..
//KenHan
Thanks. Declare worked, but echo path didnt. But, I would like to know where I can find the path, which file it is contained in. Everything I saw, I tried, but it wasnt in any of the places it was supposed to be.
Now, I will try to figure out how to add to my path.
I tried export, and go this:
mugs@linux:~> export PATH =$PATH: /usr/local/kde/bin
bash: export: `=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/opt/kde2/bin:/usr/openwin/bin:/usr/lib/SmallEiffel/bin:/usr/lib/java/bin:/opt/gnome/bin:/opt/pilotsdk/bin:': not a valid identifier
bash: export: `/usr/local/kde/bin': not a valid identifier
mugs@linux:~>
this should be export PATH=$PATH:/new/pathOriginally Posted by mugs
no spaces
whatdoyougetwhenyoumultiplysixbynine??
Thanks, Alastair, that did it. I still would like to find the file that contains the path... ???
The PATH is actually just an enivronmental variable which is constructed by various runlevel scripts.
If you take a look at /etc/profile (Not sure on RH?) it will have various sections which construct the PATH, some based off of user ID I believe. Also, (again, not sure in RH), there are various scripts in /etc/profile.d which add values to the PATH.
Just so you know, if you want to view an environmental variable, you can use echo, but you must use $PATH, because it is case sensitive.
Using echo in export commands is useful for doing things quickly like:
export PATH=$(echo $PATH | sed -e 's/:.:/:/g' s/::/:/g')
This will delete any occurance of . or :: from the PATH.
If you're interested further you can always take a look at the bash manual.
you can also do a user-specific change by adding the line to ~/.bashrc , just below thie line that says user specific aliases ro something to that effect
whatdoyougetwhenyoumultiplysixbynine??
Red Hat sets the path in various places.
changes effect all users
/etc/profile
/etc/profile.d
change for a specific user only.
~/.bash_profile
Jim H
Bookmarks