The command could not be located because ‘/bin’ is not included in the PATH environment variable. ls: command not found

This is because path environment variables is not set correctly. The .bashrc file should contain following variables in it.

 

Fix

export PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games”

Run the command to ensure it
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/local/games

Leave a comment