LinuxQuestions.org
Visit Jeremy's Blog.
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 04-22-2003, 12:52 PM   #1
hagbardc
LQ Newbie
 
Registered: Apr 2003
Posts: 9

Rep: Reputation: 0
Problems with $PATH


I'm having a problem with my path. When I check my path (typing $PATH at a bash prompt), I get the following output:

bash: /usr//bin:/bin:/usr/bin::/usr/local/bin:/usr/X11R6/bin:/usr/games:/home/kennyb/bin: No such file or directory


I get this whenever I login to any user on the machine (but not when I login as root - then the path is fine)

Now, I think the reason I get this is that the path isn't valid (note the double slash in the first directory, and the double colon seperating the third and forth directories). But I can't figure out how to fix the problem. I checked the usual suspects (/etc/profile, ~/.bashrc, ~/.bash_profile ) and those have the following (relavent) lines:

/etc/profile:
-------begin profile----
if ! echo ${PATH} | grep -q /usr/X11R6/bin then
PATH="$PATH:/usr/X11R6/bin"
fi

export PATH
-------end profile----


~/.bashrc:
-------begin .bashrc----
PATH=$PATH:$HOME/bin
export PATH
-------end .bashrc----


and .bash_profile doesn't have PATH show up at all


So, I suppose what I'm asking is - where else is the path set? There's got to be some script or init file that I don't know about (certainly not surprising - I've only been using linux for about a week now) that is setting the path for users incorrectly. Any help would be greatly appreciated.
 
Old 04-22-2003, 12:57 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
that's not a problem, jstu a case of using bash incorrectly...

"echo $PATH"

not just plain

"$PATH"

that is trying to run the path vairable as a program, which naturally makes no sense,
 
Old 04-22-2003, 01:50 PM   #3
hagbardc
LQ Newbie
 
Registered: Apr 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Oh, right.

<embarrased chuckle>


That seems to work. Thanks very much.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
set path problems boydasilva Linux - Newbie 3 12-09-2004 05:28 PM
xmkmf and path problems epoo Linux - Software 0 01-17-2004 05:13 PM
Some problems regarding path and X Peppe Linux - Newbie 1 10-23-2003 01:20 PM
PATH problems.. please help n3wb1e Linux - Newbie 4 10-17-2003 10:15 PM
Full Path problems chedmaster Linux - Newbie 1 06-26-2003 10:24 AM

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

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