Re: Unable to start program
On Tue, 7 Apr 1998, Gabrie van Zanten wrote:
> Hi,
>
> Sometimes I see a program (I think) but I can't run it, even though I'm
> using root. Like this one:
> -rwxr-xr-x XF86_S3V 2043768
>
> I thought I could at least run it and get an error, but Linux says: command
> not found. I had this too when installing fortune. After logging in as a
> user I could run fortune, but not before as root (fortune was in the users
> PATH, does it matter?).
If its not in your $PATH, the shell won't find it. Unix, unlike dos, does
not automatically consider the current directory ( $PWD ) to be part of
$PATH, unless you explicitly set it so ( eg. add a dot to $PATH like so:
export PATH=$PATH:. )
If you type ./commandname that will always work, because the shell sees an
absolute path prepended to the command, just like as if you had typed
/home/userx/somedir/command
Of course, the commandname file must have the execution bit set ( chmod +x
commandname )
Cheers,
Joost
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: