0

There is a problem. I enter the sudo command in the terminal and get

zsh: command not found: sudo

I'm entering

export PATH=/usr/bin:/bin:/usr/sbin:/sbin

Everything works fine, but as soon as I start the terminal again, the error returns

My PATH

/usr/bin:/Users/falsehuman/Library/Android/sdk/tools:/Users/falsehuman/Library/Android/sdk/tools/bin:/Users/falsehuman/Library/Android/sdk/emulator:/usr/local/opt/postgresql@14/bin:/opt/homebrew/bin:/usr/local/bin:/Users/falsehuman/Library/Android/sdk/platform-tools:/Library/Apple/usr/bin:/bin

4
  • It should find sudo with that PATH, since it's located in /usr/bin, and this is the first directory in the path.
    – Barmar
    Commented Nov 12 at 18:15
  • Try the command, where sudo and let us know the output.
    – SteveM
    Commented Nov 12 at 20:49
  • 2
    The screenshot shows a completely different PATH, which doesn't make much sense. I think you need to go through all the shell initialization files that you've modified or created, and clean them up or just start over. You can find the names of those files in the zsh(1) man page.
    – Linc Davis
    Commented Nov 13 at 4:12
  • @LincDavis /usr/bin/ is in the PATH shown in the screenshot. But something is of for sure.
    – nohillside
    Commented Nov 13 at 20:25

0

You must log in to answer this question.

Browse other questions tagged .