Visit Jeremy's Blog.
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 12-01-2005, 09:36 PM   #1
Registered: Jun 2005
Location: Aylesbury UK
Distribution: Red Hat enterprise linux 6
Posts: 101

Rep: Reputation: 15
Changing the PATH variable

If I write echo $PATH, I can see what the path is,but how do I change it ?
Old 12-01-2005, 10:00 PM   #2
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
If you want to change it temporarily, use the following:
export PATH=$PATH:/new/directory/to/add
To make the change permanent, add the above line to ~/.bashrc. If you want to make the changes for all users, add the line (as root) to /etc/profile. To see the changes after editing these files, run the command
source ~/.bashrc
I hope this helps


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
changing path environment variable iNET_boss Linux - Newbie 2 07-27-2005 05:35 PM
PATH variable jk21 Linux - Newbie 1 09-28-2004 03:48 PM
$path variable ? moby Linux - Newbie 3 06-01-2004 04:18 PM
Changing $PATH env variable alzogbi Linux - Newbie 2 03-26-2004 03:06 AM
the path variable mjkramer Linux - Newbie 4 10-18-2003 08:18 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:59 AM.

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
Open Source Consulting | Domain Registration