LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 10-27-2009, 11:05 AM   #1
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Rep: Reputation: 30
Question $PATH appears to be very limited


When I run echo $PATH I get the following path information:
Quote:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
This seems to be a very limited/restricted path. Where do I find the paths for the installed applications?

I'm pretty sure that the applications are not all binaries and have their own paths stored somewhere.

I ask because I believe my problems with Samba stem from faulty path information.

Thanks
 
Old 10-27-2009, 11:13 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Which user's $PATH is that?

My ordinary user's $PATH is /usr/local/bin:/usr/bin:/bin:/usr/games (and I don't need /usr/games).

My root's $PATH is /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games.

No $PATH-related problems, AFAIK.

One workaround for the problem you describe is putting symlinks in one of the directories listed in $PATH, pointing to the executables you are having problems with.
 
Old 10-27-2009, 11:22 AM   #3
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by AndeAnderson View Post
When I run echo $PATH I get the following path information:

Quote:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
This seems to be a very limited/restricted path. Where do I find the paths for the installed applications?

I'm pretty sure that the applications are not all binaries and have their own paths stored somewhere.
That's quite a normal PATH for a Linux system. On *nix systems in general, things don't get their own installation path - the binaries will generally end up in one of the /bin or /sbin paths you mentioned above. Search for the File Hierarchy System if you want to know more.

Having said that, sometimes packages will install in another location, especially if they have a lot of things to install (e.g. /usr/bin/X11/ has a lot of binaries, on my system). If you post the specific error messages you get, we can help you with that, and the organisation of the filesystem structure'll become clear over time.

John G
 
Old 10-27-2009, 11:46 AM   #4
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Original Poster
Rep: Reputation: 30
I'm not getting error messages. I have been working with camorri
Senior Member in the the Linux Networking Forum to resolve a failure of sharing files between my new Debian system and my existing Windows systems.

I was wondering if, somehow, there might be a path error preventing Samba from being fully functional. The daemons are running, but access is still being denied in both directions.

That is why I am asking about how paths are used in Linux. I have grown used to being able to find a specific path to an application in the Registry. However, I have been unable to locate an equivalent file in Linux.

I have quit logging in as a User and login as Root, until I need to test the system. So, the path I provided is from my Root Login.

Thanks
 
Old 10-27-2009, 12:11 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
It is unlikely to be a $PATH problem, given that yours are normal.

How about starting a new thread for a Samba problem? Maybe someone here at LQ will be able to help, despite your already having received quality advice at the Linux Networking Forum.
 
Old 10-27-2009, 01:33 PM   #6
Zen alsory
Member
 
Registered: Aug 2008
Location: At home
Distribution: Fedora 13
Posts: 49

Rep: Reputation: 16
Hello All..
I have a question and i think it's nice to write it here ...
I want to add a path to $PATH (Zain-user)so i write :
Quote:
export MPJ_HOME=/home/Zain/Documents/Cluster/mpj
export PATH=$PATH:$MPJ_HOME/bin
But in this way i lost the path every new session !!
what do i have to write in terminal ??
 
Old 10-27-2009, 03:03 PM   #7
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by Zen alsory View Post
But in this way i lost the path every new session !!
what do i have to write in terminal ??
The bash shell reads certain files whenever it starts up - read the `invocation' section in the bash man page for details.

The quick-fix: put those two lines at the end of (for example) /etc/profile file and everyone on your system will have them, all the time - put them in ~/.bash_profile if you only want a particular user to have them.
 
Old 10-28-2009, 07:33 AM   #8
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by catkin View Post
It is unlikely to be a $PATH problem, given that yours are normal.

How about starting a new thread for a Samba problem? Maybe someone here at LQ will be able to help, despite your already having received quality advice at the Linux Networking Forum.
I have a Thread for my Samba problem in the Networking Forum. Should it be posted somewhere else?

I didn't want to post, what I considered, an unrelated generic issue, I am confused about, in the networking thread. There are many things I am trying to learn and understand about the *nix distro's. Especially after all of the Windows exposure I have had.

Thanks
 
Old 10-28-2009, 08:43 AM   #9
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by AndeAnderson View Post
I have a Thread for my Samba problem in the Networking Forum. Should it be posted somewhere else?
I am sorry; I assumed the Networking Forum was somewhere else, not on LQ! You are quite right, it is best netiquette to keep it in one place.
 
  


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
bash script path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 05:48 PM
set up java_home path in /home/user/.bashrc but use path in /usr/lib/java vitalstrike82 Slackware 4 01-13-2009 11:25 PM
script to change unix path to windows path in all files csross Programming 8 04-29-2006 01:05 PM
Why is the value of $PATH in console mode different from the $PATH in xterm emulator? Akhran Debian 9 03-09-2006 06:10 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 - Newbie

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