LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   adding to path (https://www.linuxquestions.org/questions/linux-software-2/adding-to-path-141133/)

hamish 02-01-2004 05:07 PM

adding to path
 
Hey

I would like to add a line to my path, however, I don't know how to.

I have been trying to install Quanta and need to:

Add /usr/local/kde/bin to your PATH and
add /usr/local/kde to your KDEDIRS

Could you please tell me how to do this?

Thanks
Hamish

FragInHell 02-01-2004 05:18 PM

If your using a Bash shell try this.

export PATH=$PATH:yournewpath:

e.g export PATH=$PATH:/usr/local/kde/bin:

you can also create any enviroment variable this way.

export MYPATH=/usr/local/somewhere:

Andrew Benton 02-01-2004 05:57 PM

Yes, but that just lasts till you close the shell. If you want the variable set every time you open a shell, add
Code:

export  PATH=$PATH:/usr/local/kde/bin
export KDEDIRS=$KDEDIRS:/usr/local/kde

to the .bashrc file under your home directory. If ~/.bashrc doesn't exist, create it.

mikshaw 02-01-2004 07:24 PM

May be a silly question, but what is the purpose of "export"? I've used only PATH=${PATH}:/new/path in ~/.bashrc, and it seems to work perfectly.

hamish 02-05-2004 03:03 PM

Thanks guys.

The other thing I wanted to know was how to find out to find out what paths to user is in.

I know it is something like echo $ , but i can't remembr exactly.

Thanks
Hamish

DrOzz 02-05-2004 03:11 PM

just simply type :
$PATH
in the terminal ..

hamish 02-05-2004 04:21 PM

Once again, thank you.

hamsih

Squall 02-05-2004 09:35 PM

Quote:

Originally posted by DrOzz
just simply type :
$PATH
in the terminal ..

Uh... don't you mean "echo $PATH" ?

DrOzz 02-05-2004 10:03 PM

no, i'm sorry to say i didn't mean that ..
Code:

[.:.jay.:. .:.(~).:.] $PATH
bash: /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:
/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt-3.2.1/bin:/usr/share/texmf/bin:.: No such file or directory
[.:.jay.:. .:.(~).:.]



All times are GMT -5. The time now is 07:49 AM.