Recently, I've been unable to use the sudo command in terminal. Any command I try to give it, file I try to get it to run, etc, tells me sudo: [command or file]: command not found
. If I try to run sudo without any arguments though, it tells me the usage and what arguments I am allowed to use with sudo, so I know the system is at least aware of sudo — it's just broken.
I've followed the answers to all the other questions i've seen with a similar issue, but none of them have helped.
echo $PATH gives me /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
, so that's all set properly
I don't believe .bash_profile is in use (I'm on Apple silicon which means it uses .zprofile instead, from what I understand?), but I set the PATH there just in case. .zprofile had some changes to it from installing python, but I commented those out and set the PATH anyway just to be safe. Still nothing.
# The original version is saved in .zprofile.pysave
#PATH="/Library/Frameworks/Python.framework/Versions/3.11/bin:${PATH}"
#export PATH
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export PATH
What's going on?
sudo ls
before making the claim thatsudo
might be broken.sudo
isn't found. It says that the command you're trying to run with it isn't found.