LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 03-21-2004, 11:50 AM   #1
Cichlid
Member
 
Registered: Jan 2002
Location: Montreal
Distribution: Ubuntu 8.10
Posts: 178

Rep: Reputation: 30
$path


Hello,

I'm running SUSE 8.0.

I know how to add a directory to my $PATH with the export command. But what if I wish to remove a directory from $PATH? Is there a way to do this? Also, I was once told that if I wanted to manually edit my $PATH, I would goto my .profile in my home directory. Yet, this does not seem to be the case.

Thanks,

Erik
 
Old 03-22-2004, 03:20 AM   #2
Ice9
Member
 
Registered: Jun 2002
Location: Belgium
Distribution: Sidux
Posts: 313

Rep: Reputation: 30
You have to edit .bash_profile in your home directory.
Remove any line you want from your $path and save the file.
 
Old 03-22-2004, 06:45 PM   #3
Cichlid
Member
 
Registered: Jan 2002
Location: Montreal
Distribution: Ubuntu 8.10
Posts: 178

Original Poster
Rep: Reputation: 30
Oh yes, I have heard of this file. I do not have this file? I'm not sure of why. One person tells me that each distro tends to have a few different ways of working.

Thanks a lot though.
 
Old 03-22-2004, 07:01 PM   #4
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
echo $PATH

then create the file .bash_profile and put this line in it

PATH=[list from echo $PATH command]

Then you can remove a directory from the list
 
Old 03-23-2004, 02:46 AM   #5
Ice9
Member
 
Registered: Jun 2002
Location: Belgium
Distribution: Sidux
Posts: 313

Rep: Reputation: 30
Quote:
Oh yes, I have heard of this file. I do not have this file
You should have it but it's a hidden file, notice the . in front of it?
In a terminal type
$ kedit /home/your_user_ID/.bash_profile

Of course you can replace kedit with your favorite editor.
 
Old 03-23-2004, 07:48 PM   #6
Cichlid
Member
 
Registered: Jan 2002
Location: Montreal
Distribution: Ubuntu 8.10
Posts: 178

Original Poster
Rep: Reputation: 30
Yes, I am aware of the hidden files with the "." in front. Maybe someone else that is also running SuSE can confirm if their setup is the same?

Thanks for the help.
 
  


Reply



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
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 12:24 AM
Removing path form PATH maginotjr Linux - Newbie 3 02-12-2005 02:23 PM
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 - Distributions

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