Review your favorite Linux distribution.
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 04-04-2007, 09:15 PM   #1
LQ Newbie
Registered: Oct 2005
Posts: 18

Rep: Reputation: 0
How to change PATH varibale permanently

Hi I want to change the value of PATH variable.
One way is to using export.

but is there any other way, which can retain the exported path after reboot???
Old 04-04-2007, 11:23 PM   #2
Senior Member
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
for a specific user, edit the /home/username/.bash_profile

For system wide paths, I usually edit /etc/profile. Not sure if this is kosher, but it works for me.
Old 04-05-2007, 12:55 AM   #3
Registered: Feb 2006
Location: Oldsmar, Fl. USA
Distribution: Slackware, Ubuntu
Posts: 176

Rep: Reputation: 50
Yeah, if you edit /etc/profile then the changes will survive a reboot. This is the way I do it. There are other ways; the most common being to make a shell script and have it run from /etc/rc.d/rc.local
Old 04-05-2007, 02:46 AM   #4
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
This question has been asked a hundred of times. Maybe using the search could help...


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
Can't permanently change path SuperRunt Linux - Newbie 11 02-02-2005 11:59 PM
How do I change ROOT's $PATH permanently? lucasrj SUSE / openSUSE 3 01-29-2005 09:31 AM
edit value of PATH permanently rsumbeling Linux - General 2 12-13-2004 10:57 AM
$PATH varibale chongluo Linux - Newbie 5 03-25-2004 01:46 PM
How to set PATH permanently chandhru Linux - Newbie 3 09-24-2002 12:43 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:16 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