Quote:
How the hell could I fix this shit without having to reinstall?
|
Swearing won't do any good, so you can start off by stopping that.
"command not found" means your shell doesn't know where the executable for 'sudo' is. This can mean that it doesn't exist on the system, or more probably, it is not in a directory that is stored into your $PATH environment variable. The directories that are in $PATH variable are checked when ever you type a name that the shell interprets might be an executable. So for example if sudo was in /usr/bin/sudo but /usr/bin was not in $PATH, then issuing 'sudo' would not work. Instead adding /usr/bin to your $PATH or running 'sudo' with full path like this
should do the job.
So first find out if the executable is on the system (it is, unless somebody removed it). You can use (s)locate if you have run 'updatedb' as root and the sudo executable has not been touched after that, or you can use find:
Code:
find / -type f -name sudo 2>/dev/null
This starts to look from / (and enters the subdirectories recursively), looking for a type f file (regular file) whose name is 'sudo'. The rest of the line (2>/dev/null) tells the shell to forward stderr messages (errors) to /dev/null, effectively not printing them to the screen. This is because if you run that as non-root user, you will get loads of "Permission denied" messages which we are not interested in here.
The result should find sudo executable if it is someplace you can access. If not, run the command as root and see why you can't access 'sudo', or reinstall sudo package.