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
- https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html
- https://support.apple.com/102360
- https://github.com/apple-oss-distributions/shell_cmds/tree/main/sh
Related system processes on Mac
- What is AccessibilityUIServer on Mac? · Accessibility UI Server
- What is com.apple.appkit.xpc.ThemeWidgetControlViewService on Mac? · AppKit theme widget view service
- What is com.apple.systempreferences.AppleIDSettings on Mac? · Apple Account Settings
- What is AquaAppearanceHelper on Mac? · Aqua Appearance Helper
- What is AudioConverterHardenedService on Mac? · Hardened Audio Converter service
- What is com.apple.quicklook.thumbnail.AudiovisualExtension on Mac? · Audiovisual Quick Look thumbnails