issue: ping is not found: zsh: command not found: ping

/sbin/ping -c 3

returns the expected result

echo $PATH returns:


cat ~/.zshrc returns:

export PATH=/Users/user/Scripts:$PATH%

Will removing the % in .zshrc restore /sbin to the path? I am reluctant to simply try it out for fear of borking up a relative's computer.

  • 1
    You should also figure out why it was put in there in the first place, and fix that.
    – Barmar
    Commented Jan 24 at 23:00
  • 1
    The % is of course nonsense. Since your relative owns the computer, he is the "master of the configuration", so if you change this, ask him what he intended with this odd configuration. To me, it simply looks like a typo when the .zshrc was edited. But while you are at it, you could do it properly and enclose $PATH between double-quotes. Commented Jan 25 at 9:35
  • Or else the user is mixing up Windows environment variables access in cmd.exe e.g. %PATH%
    – mmmmmm
    Commented Jan 25 at 17:18

1 Answer 1


Sure, you can remove % from the line with the export command, it shouldn't be there.

After editing it, make sure to also run

export PATH=/Users/user/Scripts:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

to fix it for the current shell.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .