ls,su,yast2: Command not found

I can’t make any of the commands work, they all say they aren’t found. I’ve googled around a fair bit, and I keep seeing I need to change my PATH variables, but I don’t know what to!!

So ls, su, and yast2 don’t work when I type them in by themselves ie:

reuben@linux-qgyq:~> yast2
bash: yast2: command not found

Is there an easy solution to fixing this?

Thanks alot,
Reuben

Post the output of:

echo $PATH

Yes. Be root.

su -
yast2

Normal users don’t have sbin in their path.

Yes, but not having ls or su in one’s path is pretty bad, as they are both in /bin so the OP must have messed things up. Probably in trying to get yast2.

echo $PATH
/home/reuben/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:.

Hows that looking? I’m not really sure what I should add to it, or how I even do that for that matter!

Yes. Be root.
Don’t I have to use ‘su’ to do that!

not having ls or su in one’s path is pretty bad, as they are both in /bin

It looks like i have /bin in there, what’s going on!!

Try these commands:

which ls
/bin/ls
reuben@linux-qgyq:~> which ls
/bin/ls

reuben@linux-qgyq:~> /bin/ls
aclocal.m4  compiz-cube.pc.in   config.h.in   COPYING.GPL   Documents       images            intltool-extract.in  kde            metadata       po
AUTHORS     compiz-gconf.pc.in  config.sub    COPYING.LGPL  flash           include           intltool-merge       libdecoration  missing        public_html
bin         compiz.pc.in        configure     COPYING.MIT   foo2zjs         INSTALL           intltool-merge.in    ltmain.sh      mkinstalldirs  README
ChangeLog   compiz-scale.pc.in  configure.ac  depcomp       foo2zjs.tar.gz  install-sh        intltool-update      Makefile.am    NEWS           src
compiz      config.guess        COPYING       Desktop       gtk             intltool-extract  intltool-update.in   Makefile.in    plugins        TODO

Anything useful in there?

Edit: The commands just started working, does which do that!?!

Your guess is as good as mine.