Re: Command not found

Eric
 

Since you can log in, all is not lost and you should not have to reimage the pi to get things working.



If you type in a program name (like ls) at the prompt and there is no explicitly specified path, the shell searches, in order, each directory listed in the PATH environment variable for the program. The first instance of the program that is found gets executed. Only after searching "everywhere" without finding the program, will you get the "command not found" error.

The other effect of the above is that if you have two copies of one program and you update only one you might not see the results of an update.


If there is no PATH environment variable defined, there is no place to search, so you would have to explicitly (as done below with the ls command) specify the correct path to get it to work.



Anyway....


What is the result of the command

echo $PATH

followed, of course, by enter ?



The echo command is a built-in command for the bash shell and should work as it's not an external to bash.



Since you have a Raspberry Pi, see if typing

/bin/ls

works.

If the result of the echo $PATH shows no text and /bin/ls works, then your login session has lost its path.

If this is the case, the next step is to figure out what happened to the path. Please let me know what happens.





Eric, WB6TIX

Join RaspberryPi-4-HamRadio@groups.io to automatically receive all group messages.