You'll find the original question below the line. This edit is intended to explain better what was my real issue according to the comments.
I could login (by SSH using WiFi) on my Raspberry without trouble and suddenly my command line told me that my commands where not found. This happened after an error while reading the packages doing
sudo apt-get update.
The error message afterwards (when trying to type a command) where :
-bash: [command here]: command not found -bash: /usr/bin/sudo: No such file or directory
I could operate my Raspberry just fine before, even though this issue already appeared for me!
This is kind of linux related. I am using a couple of Raspberry's (model B) for a project, and I had this coming up a few times.
I'll explain how it happens : I made a fresh install of Raspbian (took the image from www.raspberrypi.org). and when I went through the
raspi-config and reboot it, if I try to run
sudo apt-get update it will start the update.
But then eventually it stops whil reading the packages (telling me there is an error). After that, whenever I try to send a command it tells me
-bash: [command here]: command not found and if I try to use
sudo it returns me
-bash: /usr/bin/sudo: No such file or directory.
I didn't find anything telling me why it would be happening or how to prevent it. It seems like I am good to re-install my SD card when this happens.
I am accessing my Raspberry bi SSH (via WiFi). The issue appears after I configured my Raspberry for SSH and WiFi networking! Which means that I could already launch
sudo apt-get update once before. And I wanted to install some new stuff on my Raspberry and check if there is anything new for Raspbian.