LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-25-2005, 02:25 PM   #1
ColKurtz
Member
 
Registered: Jan 2005
Location: Earth
Distribution: Fedora
Posts: 40

Rep: Reputation: 15
Why must some executables be prefaced by ./ but others do not


Some linux binaries force me to put ./ or the full path in order to launch them, else I get a "command not found". Others (startx, for example) launch just fine without a path. What makes this distinction?
 
Old 01-25-2005, 02:27 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Executable files located in your PATH can be launched without a path. PATH is the environment variable telling your shell where to look for executables. Try "echo $PATH" to see where they can be found.
 
Old 01-25-2005, 02:37 PM   #3
ColKurtz
Member
 
Registered: Jan 2005
Location: Earth
Distribution: Fedora
Posts: 40

Original Poster
Rep: Reputation: 15
Thank you. I assumed that my home directory would be in the path but I see not. But I notice /home/[my home directory]/bin)/ *IS* in the path. That makes sense, and is obviously where I should be throwing my scripts.

Thanks again.
 
Old 01-25-2005, 03:23 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
$HOME/bin is not usually in the PATH, though I added it to mine. It's good for user's own programs. On some systems, I like $HOME/.bin, so the visible directories in $HOME can be data-only.
 
  


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
Executables dudeman41465 Linux - Software 4 10-09-2005 07:59 PM
executables humblestudent87 Linux - Newbie 6 07-22-2004 11:42 AM
Executables q64 Linux - Newbie 3 03-29-2004 03:31 AM
Help on executables.... Kit Linux - General 9 12-06-2002 11:24 AM
Where are the executables? rooman Linux - Software 6 06-05-2002 02:31 PM

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

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