LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 08-17-2002, 02:24 PM   #1
nightvip
LQ Newbie
 
Registered: Aug 2002
Posts: 1

Rep: Reputation: 0
PATH enviro var


How do you add to the PATH enviromental var? I want to add to it but where do I do this.
 
Old 08-17-2002, 02:54 PM   #2
mwtheobald
LQ Newbie
 
Registered: Aug 2002
Posts: 9

Rep: Reputation: 0
If you are using bash, then just edit the .bash_profile in your home directory. Add to the PATH=... line.
 
Old 08-17-2002, 04:13 PM   #3
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
PATH=$PATH: /path/to/be/added


Put that in ~/.bashrc


What it does: PATH= - should be clear, env PATH= (= can mean contains if you will)

$PATH means take the already existing content of PATH and put it back into PATH

":" just seperates the entries

/path/to/be/added - new path to be added. Then you can check it with

echo $PATH

If im not wrong, if you followed the last post you would have erased the content of PATH variable and assigned only the new path to it, in other words you would'nt be able to run any programs but the one you are trying to add.

Im learning BASH scripting, had to show off i learned somethin today




HTH


-NSKL

Last edited by NSKL; 08-17-2002 at 04:18 PM.
 
Old 08-17-2002, 06:38 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
Global PATH (for all users) is kept in /etc/profile
 
  


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
How to use Enlightenment Desktop Enviro? justiceisblind Linux - Newbie 8 06-05-2008 09:34 AM
path/env var avail in KDE after logon? hyllplan Debian 5 05-11-2005 07:50 AM
Java 2 Enviro Install help thejokker Linux - Newbie 4 06-22-2004 04:27 AM
help - what env var for dynamic lib path? emanresu Linux - Newbie 3 05-31-2004 03:32 PM
Desktop Enviro vs Window Man. kierl Linux - General 1 01-15-2003 04:49 PM


All times are GMT -5. The time now is 08:34 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration