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-28-2004, 08:44 AM   #1
praveenv
Member
 
Registered: Aug 2004
Location: India
Posts: 54

Rep: Reputation: 15
unsetting a part of ENV variable


Dear friends !

My PATH variable contains so many paths.I want to remove Particular path from it , because I entered it wrong.
exa: PATH:/usr/bin: /usr/sbin/:/root/:etc....,Now I want to remove" /usr/bin" from it

How to do ?
 
Old 08-28-2004, 09:05 AM   #2
amfoster
Member
 
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 36
Your initial path is set in /etc/profile but you can over write it anywhere.

How did you set your extra path directories? In ~/.profile or ~/.bash_profile?

If you want to completely rewrite it just enter
export PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin

or whatever you want it to be in your ~/.profile or ~/.bash_profile
 
Old 08-28-2004, 09:24 AM   #3
praveenv
Member
 
Registered: Aug 2004
Location: India
Posts: 54

Original Poster
Rep: Reputation: 15
unset

I added ay command prompt

$PATH=$PATH:\ALL PATHS
 
Old 08-28-2004, 09:36 AM   #4
amfoster
Member
 
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 36
That shud be good just for this login session. Log out and in again and see if you get the defaults
 
  


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
socks proxy - env variable andrewlkho Linux - Networking 1 06-23-2013 09:58 PM
How to test if an env variable is set King of Men Linux - Newbie 5 11-03-2005 04:39 AM
env variable for proxy: syntax FrayAdjacent Linux - Networking 10 07-13-2005 05:44 PM
env variable allelopath Linux - Software 3 04-14-2005 12:07 PM
Changing $PATH env variable alzogbi Linux - Newbie 2 03-26-2004 02:06 AM

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

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