LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   $PATH appears to be very limited (https://www.linuxquestions.org/questions/linux-newbie-8/%24path-appears-to-be-very-limited-764808/)

AndeAnderson 10-27-2009 11:05 AM

$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

catkin 10-27-2009 11:13 AM

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.

JohnGraham 10-27-2009 11:22 AM

Quote:

Originally Posted by AndeAnderson (Post 3734218)
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

AndeAnderson 10-27-2009 11:46 AM

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

catkin 10-27-2009 12:11 PM

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.

Zen alsory 10-27-2009 01:33 PM

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 ??

JohnGraham 10-27-2009 03:03 PM

Quote:

Originally Posted by Zen alsory (Post 3734365)
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.

AndeAnderson 10-28-2009 07:33 AM

Quote:

Originally Posted by catkin (Post 3734287)
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

catkin 10-28-2009 08:43 AM

Quote:

Originally Posted by AndeAnderson (Post 3735243)
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! :doh: You are quite right, it is best netiquette to keep it in one place.


All times are GMT -5. The time now is 06:36 PM.