LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-11-2004, 09:08 PM   #1
Echo Kilo
Member
 
Registered: Jul 2004
Distribution: Ubuntu - Debian Based
Posts: 242

Rep: Reputation: 30
How do I edit my path?


How would I edit my path to add or remove certain folders to my path?
 
Old 12-11-2004, 10:37 PM   #2
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
If you want to change the path (I presume you mean the path search for executables) for a normal user then there are usually files in the home dir of that user you can edit /home/username/.bashrc and /home/usernalme/.bash_profile. Look for a line something like this:

export PATH=$PATH:/usr/X11R6/bin:/usr/local/bin:/sbin
you just add to it like this:
export PATH=$PATH:/usr/X11R6/bin:/usr/local/bin:/sbin:/path/to/newdirectory

For root look for the files in /root

For system wide settings look in /etc , but the names of the files and location vary by distro. Try /etc/profile and /etc/bashrc

Last edited by kevinalm; 12-11-2004 at 10:41 PM.
 
Old 12-12-2004, 12:47 PM   #3
Echo Kilo
Member
 
Registered: Jul 2004
Distribution: Ubuntu - Debian Based
Posts: 242

Original Poster
Rep: Reputation: 30
Yep, I somehow messed up my roots path, but none of that was in the root directory.
 
Old 12-12-2004, 01:50 PM   #4
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Well, if there are no bash configuration files in the home directory (/root for root or /home/username for a user) then it is supposed to use the system defaults. Maybe the files in /etc have been altered but for normal users it gets overridden by the /home/username files. One other thing, you do know that files that begin with a . are hidden? ls -a to see them.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
edit value of PATH permanently rsumbeling Linux - General 2 12-13-2004 10:57 AM
How to edit default PATH? davidas Linux - Newbie 2 03-20-2004 05:34 AM
How to edit the value of $PATH? ICO Slackware 1 02-07-2004 04:38 AM
how do i edit my echo$PATH Laptop2250 Linux - Newbie 6 11-15-2003 11:33 AM
Install problems/Do I edit the path? Toker Linux - Newbie 15 10-24-2003 01:33 AM

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

All times are GMT -5. The time now is 11:23 PM.

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