LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-01-2004, 03:37 PM   #1
xbennyboy
Member
 
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, 03:43 PM   #2
Tamsco
Member
 
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
fi
 
Old 08-02-2004, 05:54 AM   #3
sc00by
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

sc00by
 
Old 08-02-2004, 06:12 AM   #4
jax8
Member
 
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.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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