Latest LQ Deal: Linux Power User Bundle
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-01-2004, 04:37 PM   #1
Registered: Jul 2004
Distribution: openSUSE 10.2
Posts: 141

Rep: Reputation: 15
Fixing PATH

I am trying to set the PATH environment variable with the export command. But after I quit my terminal, the variable returns to its original state. I have been told that export is the command to use but it doesn't work for me. Help!!
Old 08-01-2004, 04:43 PM   #2
Registered: Jul 2004
Location: 1st Brillouin Zone
Distribution: Gentoo (not ricer Gentoo)
Posts: 165

Rep: Reputation: 30
There should be a file called .bashrc in your home directory. This file gets executed whenver you login so just add the export command to it and you should be fine. This is what mine looks like, I run Fedora Core 2. I can't speak for what other distros do

# .bashrc

# User specific aliases and functions
export PATH=$PATH:/usr/lib/j2sdk1.4.2_04/bin

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
Old 08-02-2004, 06:54 AM   #3
LQ Newbie
Registered: Jul 2004
Location: UK
Distribution: Slackware
Posts: 2

Rep: Reputation: 0
Running SuSE Linux ??

.. then create a new file in /etc directory named 'profile.local' to define and export enviroment..

Hope that help

Old 08-02-2004, 07:12 AM   #4
Registered: Feb 2004
Location: Australia
Distribution: Ubuntu, Fedora 10
Posts: 632

Rep: Reputation: 31
you can put it in /etc/profile or .bashrc in you home directory.

The difference being that /etc/profile will make the command global so all users will get it added to their PATH and .bashrc will only do it for the current user.


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
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 08:45 AM
Apache path and kde path questions darkraider Debian 1 11-12-2005 06:07 AM
Removing path form PATH maginotjr Linux - Newbie 3 02-12-2005 03:23 PM
Fixing XP rml54321 Member Success Stories 2 09-16-2004 11:54 AM
How to Chnage Python's module search path (sys.path)? lramos85 Linux - Software 1 05-02-2004 07:10 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration