Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-17-2002, 02:24 PM   #1
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
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
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



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

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


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration