What Is /bin/sh

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 11, 2026

Quick Answer: /bin/sh is the Bourne shell, a POSIX-compliant command interpreter created by Stephen Bourne in 1977 and traditionally the default system shell on Unix and Unix-like systems. On modern systems, /bin/sh is typically a symbolic link to another shell like bash or dash, but maintains compatibility with POSIX shell scripts and standards.

Key Facts

Overview

/bin/sh is the system shell interpreter, a command-line program that reads and executes user commands and shell scripts on Unix and Unix-like systems. Created by Stephen Bourne in 1977 at AT&T Bell Labs, the Bourne shell became the standard interactive and scripting shell for decades and influenced most modern shell designs.

On contemporary Linux and Unix systems, /bin/sh typically exists as a symbolic link pointing to another shell such as bash (Bourne Again Shell), dash (Debian Almquist Shell), or other POSIX-compliant shells. The POSIX standard formally specified /bin/sh as the location where a standards-compliant shell must be available, making it essential for system portability and script compatibility.

How It Works

The /bin/sh shell operates through a straightforward process when you execute a command or script:

Key Comparisons

Feature/bin/sh (POSIX)bash (Bourne Again)zsh
POSIX CompliantYes (by definition)Yes, with extensionsNo, custom syntax
Script PortabilityMaximum portability across Unix systemsPortable with bashismsRequires zsh installed
PerformanceLightweight and fast executionSlightly heavier, more featuresMore resource intensive
Default System UsageStandard for system scriptsCommon interactive shellAdvanced user preference
Interactive FeaturesMinimal, POSIX-onlyHistory, completion, advanced editingExtended features and themes

Why It Matters

/bin/sh remains foundational to Unix philosophy and system administration. Whether you're writing shell scripts, configuring system automation, or troubleshooting Unix systems, understanding /bin/sh provides essential knowledge for effective system interaction and scripting. The shell's longevity since 1977 demonstrates the enduring importance of its core design principles.

Sources

  1. POSIX Shell SpecificationPublic Domain
  2. Bourne shell - WikipediaCC-BY-SA-4.0
  3. GNU Bash ManualGFDL-1.3

Missing an answer?

Suggest a question and we'll generate an answer for it.