For the first time, an incident of being unable to execute ‘ls’ happened.
The issue was, he can run it via /usr/bin/ls but not just ls.
The solution is, check environment variables: echo $PATH
if the absolute path of executable files is not shown, add it by:
PATH=”directory:$PATH”
e.g
PATH=”/usr/sbin:$PATH”
or
export PATH=$PATH:/usr/sbin
Tags: Commands