Strange behavior on fresh Debian installation

Linux for blind general discussion blinux-list at redhat.com
Mon Feb 4 16:19:06 UTC 2019


Tim here.  It sounds like you're going down the right path here.  If
something modified the $PATH environment variable, it would cause
exactly the symptoms the OP is experiencing.  The most common cause
I've seen is trying to set the PATH to include a new location but
failing to keep the old one around, something like

   PATH=/path/to/new/location

instead of

   PATH=/path/to/new/location:$PATH

I presume that the tools are still around and can be accessed by
absolute path name, so if "ls" fails, I imagine that "/bin/ls" still
works as expected.  If this isn't the case, it would be valuable
information to have in troubleshooting.

-tim

On February  4, 2019, Linux for blind general discussion wrote:
> I have seen stuff like that also.  When you first boot and
> everything works, echo $PATH as others have already advised and
> save that to somefile as in echo $PATH >somefile.
> 
> 	Then when things go to pot, echo $PATH >someotherfile.
> 
> 	Also, do the following:
> 
> pwd >mydir.  In this case, the file mydir will contain your
> absolute path.  Then things go bust.  Try pwd again and see what
> happens.  You might have something going that does a chroot which
> is a great command but very powerful.  If it occurs for the wrong
> reasons, you may have been put in to an environment that can't
> reach all your normal executables.
> 
> 	You still will have to figure out what caused this and
> how to fix it, but that's what makes unix good.  You have grownup
> power tools to fix things with.  Just as a table saw will cut off
> fingers as easily as it cuts wood, it's been said that unix can
> give you some of the prettiest rope you ever hanged yourself with
> so go cautiously.
> 
> 	At least your boot starts out working so whatever happens
> isn't a permanent change.
> 
> Martin McCormick
> Linux for blind general discussion <blinux-list at redhat.com> writes:
> your execution path and causes everything to stop working.
> 
> 	If you run something that uses a command like chroot, you
> can get pure weirdness because chroot makes it impossible to
> search outside your current directory
> > On Mon, 4 Feb 2019, Linux for blind general discussion wrote:
> > 
> > 
> >     I'm having strange behaviour on fresh install of Debian 9
> >     After I login and work for  a while then any command on bash
> > terminal is
> >     missing with message such as the following
> >     bash: ls command not found
> > 
> > 
> > You're not bumping the capslock by any chance?
> > 
> > If not, run:
> > 
> > echo $PATH
> > 
> > (note PATH in all capitals)
> > 
> > 
> > to make sure that your search path hasn't changed. It should
> > include /usr/ bin and /bin and ideally /usr/local/bin. Root
> > should also have /usr/sbin and /sbin.
> > 
> > 
> > HTH,
> > Geoff.
> > 
> > _______________________________________________
> > Blinux-list mailing list
> > Blinux-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/blinux-list
> > 
> >   
> 
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/blinux-list




More information about the Blinux-list mailing list