What is sh on Mac?

sh (POSIX shell) · seed · quit hint: caution

sh is a macOS process (listed here as sh (POSIX shell)). People usually find it in Activity Monitor when asking “what is this process?”

What does sh do?

POSIX sh — the system script interpreter at /bin/sh, listed in /etc/shells. On Apple silicon macOS this is a distinct /bin/sh binary (historically tied to bash-in-POSIX-mode via the /var/select/sh mechanism). Almost every #!/bin/sh script, xargs -c, make $(SHELL), Java Surefire/Maven process launchers, launchd ProgramArguments that use sh -c, and many GUI ‘Run Script’ phases appear as this process. CPU spikes almost always belong to the command string after sh -c, not sh itself — expand the process tree. Short-lived sh -c helpers are normal; a long-lived interactive sh is uncommon on modern Macs (default login shell is zsh). Safe to let ephemeral script shells exit on their own; avoid kill -9 while a package install or test runner is mid-flight under that sh.

When to leave sh running

  • interactive-shell-session
  • foreground-job-running

Is it safe to quit sh?

Hint: caution. SystemWoe Free and Pro use keep-guards so you don’t blindly kill something important — Pro adds force-terminate only with confirmation.

Further reading

Related system processes on Mac

Suggest an editAll entries