LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-12-2004, 04:27 AM   #1
twallstr
LQ Newbie
 
Registered: Aug 2004
Posts: 25

Rep: Reputation: 15
export PATH disappears


I am having a problem exporting a new PATH. In a shell I entered as root;
PATH=$PATH:/usr/local/Acrobat5/bin
so as to get the executable file acoread.
While in the same shell I check the PATH via echo $PATH and the new row shows up.
Now I try to make the change permanent via;
export PATH

After exiting the shell and starting a new one the recently entered PATH has disappeared.

Anybody have any ideas why this is happening?

I am running Mandrake 10.1 with KDE.

Thanks
twallstr
 
Old 12-12-2004, 04:34 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
export PATH does not maintain across new bash sessions. To make permanent changes to your PATH you have to place them in a location that bash will execute every time it's launched, for example, ~/.bash_profile or globally /etc/profile

Cool
 
Old 12-12-2004, 10:46 AM   #3
twallstr
LQ Newbie
 
Registered: Aug 2004
Posts: 25

Original Poster
Rep: Reputation: 15
But I thought that was exactly what the "export PATH" command did.
I do not need to use that command as long as I am still running the same shell where I wrote the PATH=$PATH.... command.
There must be a way of making it permanent without editing one or more files.

Thanks

twallstr
 
Old 12-12-2004, 11:01 PM   #4
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Quote:
There must be a way of making it permanent without editing one or more files.
No, theres not. As MasterC said, you need to add the line:
Code:
export PATH=$PATH:/usr/local/whatever
to the ~/.bash_profile file.

Alternatively, since there is only one executable in the Acrobat5 bin directory, simply make a symbolic link to acroread somewhere in your PATH:
Code:
ln -s /usr/local/Acrobat5/bin/acroread /usr/bin
Then you can start acrobat by typing "acroread" in the xterm.

I hope this helps
--Ian
 
Old 12-13-2004, 03:57 AM   #5
twallstr
LQ Newbie
 
Registered: Aug 2004
Posts: 25

Original Poster
Rep: Reputation: 15
I will try both ways.

Thank you both for your help!

twallstr

Last edited by twallstr; 12-13-2004 at 03:58 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 08:45 AM
PATH export in etc/profile.local adds dir twice tongar Linux - Newbie 3 06-16-2005 04:56 PM
export $PATH inside script gmitra Programming 3 02-01-2005 09:34 AM
'export PATH' does not work lemuel Linux - Newbie 7 01-30-2005 12:39 PM
How to Chnage Python's module search path (sys.path)? lramos85 Linux - Software 1 05-02-2004 07:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:03 AM.

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