[ale] ubuntu install has no $PATH?

David Tomaschik david at systemoverlord.com
Mon Jul 25 10:22:54 EDT 2011


On Mon, Jul 25, 2011 at 9:54 AM, Michael B. Trausch <mike at trausch.us> wrote:
> On Sun, 2011-07-24 at 23:18 -0400, David Tomaschik wrote:
>> I cannot, for the life of me, figure out any way that PATH would not
>> be set, unless the user had somehow modified it in a profile file.
>> Also, 'cd' and 'ls' should work fine even without a path, as they are
>> shell builtins (in bash at least).  So is echo.  Getting a "command
>> not found" type error from echo, cd, or ls, would take quite a bit of
>> special work -- like some stripped busybox shell with those commands
>> missing.
>
> ls is certainly *not* a builtin.  It comes from GNU coreutils:
>
> mbt at aloe:~$ ls --version
> ls (GNU coreutils) 8.5
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> Written by Richard M. Stallman and David MacKenzie.
>
> cd has always been a built-in (as it must be due to its behavior).
> echo, printf, and test have been built-ins in bash for quite some time,
> though (there are binaries available for them for older shells that do
> not have them built-in).
>
>        --- Mike
>
> --
> Michael B. Trausch                                       mike at trausch.us

You're absolutely right, ls is not a built-in (except on busybox :)).

That was my mistake.  However, with bash, cd and echo still are, so
that should never return command not found on bash.




-- 
David Tomaschik, RHCE, LPIC-1
System Administrator/Open Source Advocate
OpenPGP: 0x5DEA789B
http://systemoverlord.com
david at systemoverlord.com



More information about the Ale mailing list