# Bourne shell

> command line interpreter for operating systems

**Wikidata**: [Q844595](https://www.wikidata.org/wiki/Q844595)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/Bourne_shell)  
**Source**: https://4ort.xyz/entity/bourne-shell

## Summary
The Bourne shell (sh) is a command-line interpreter for operating systems, developed by British computer scientist Stephen R. Bourne in 1979. It is a foundational Unix shell that implements the standard Unix shell language, serving as a core utility for executing commands and scripting in Unix-like environments.

## Key Facts
- **Developed by**: Stephen R. Bourne, a British computer scientist.
- **Inception**: 1979, with the first publication in 1977.
- **Aliases**: sh, /bin/sh, Bourne-Shell, Bourne Shell, 본셸, 본 쉘, and ボーンシェル in Japanese.
- **Instance of**: Unix shell, standard UNIX utility or command, programming language, and command line interface language.
- **Influenced by**: ALGOL 68 programming language.
- **Command-line options**: Includes options like `-c`, `-i`, and `-s` for specific shell behaviors.
- **Environment variables**: Reads variables such as `HOME`, `ENV`, `FCEDIT`, `HISTFILE`, `HISTSIZE`, `LANG`, `LC_ALL`, `LC_COLLATE`, `LC_CTYPE`, `LC_MESSAGES`, `MAIL`, `MAILCHECK`, `MAILPATH`, `NLSPATH`, `PATH`, and `PWD`.
- **Operating system**: Primarily used in Unix-like environments.
- **Wikipedia languages**: Available in 20+ languages, including English, Japanese, Korean, and multiple European languages.
- **Stack Exchange tag**: Tagged as "sh" on Stack Overflow for community support.
- **Described at**: The Open Group Base Specifications, Issue 7, provides detailed documentation.

## FAQs
- **What is the Bourne shell used for?** The Bourne shell is a command-line interpreter for operating systems, primarily used to execute commands, run scripts, and manage system operations in Unix-like environments.
- **Who developed the Bourne shell?** The Bourne shell was developed by British computer scientist Stephen R. Bourne in 1979.
- **What are the key features of the Bourne shell?** Key features include support for command execution, scripting, environment variable handling, and compatibility with Unix standards.
- **How does the Bourne shell differ from other shells like Bash?** While the Bourne shell is a foundational Unix shell, GNU Bash is a more advanced implementation with additional features and improvements.
- **What command-line options does the Bourne shell support?** The Bourne shell supports options like `-c` (execute a command), `-i` (interactive mode), and `-s` (read commands from standard input).
- **Which environment variables does the Bourne shell use?** The Bourne shell reads and sets environment variables such as `HOME`, `ENV`, `PATH`, and `PWD` to manage system and user configurations.
- **Is the Bourne shell still used today?** Yes, the Bourne shell remains a standard utility in Unix-like systems, though it is often supplemented by more advanced shells like Bash.

## Why It Matters
The Bourne shell is significant as one of the earliest and most influential Unix shells, establishing the standard for command-line interpretation in Unix-like operating systems. Its development by Stephen R. Bourne laid the groundwork for subsequent shell implementations, including GNU Bash. As a core utility, it enables users to execute commands, manage system operations, and write scripts, making it essential for system administration and software development in Unix environments. Its adherence to the Open Group Base Specifications ensures compatibility and reliability across different platforms.

## Notable For
- **Foundational role**: The Bourne shell is a foundational component of Unix-like systems, providing the standard command-line interface.
- **Standardization**: It adheres to the Open Group Base Specifications, ensuring compatibility and reliability.
- **Environment variable support**: The shell reads and sets numerous environment variables, enabling dynamic configuration and operation.
- **Cross-platform use**: Available in Unix-like environments, including Linux and BSD systems.
- **Community support**: Actively supported through Stack Overflow and other developer communities.

## Body
### History
The Bourne shell was developed by Stephen R. Bourne in 1979, with its first publication in 1977. It was designed as a standard Unix shell, implementing the Unix shell language and serving as a core utility for command execution and scripting. The shell's development influenced subsequent shell implementations, including GNU Bash.

### Development
Stephen R. Bourne, a British computer scientist, created the Bourne shell to establish a standardized command-line interpreter for Unix systems. His work laid the foundation for modern shell environments, ensuring compatibility and reliability across different Unix-like platforms.

### Features
The Bourne shell supports command execution, scripting, and environment variable handling. It includes command-line options like `-c`, `-i`, and `-s` for specific behaviors, and reads environment variables such as `HOME`, `ENV`, `PATH`, and `PWD`. These features make it a versatile tool for system administration and software development.

### Related Projects
The Bourne shell is related to other Unix shells, including the Unix shell and GNU Bash. It is influenced by the ALGOL 68 programming language and is used alongside tools like TLP, LXC, Byobu, and rkhunter in Linux environments. The shell's compatibility with the Open Group Base Specifications ensures its reliability and widespread adoption.

### Community and Support
The Bourne shell is supported by developer communities, including Stack Overflow, where it is tagged as "sh" for community discussions and troubleshooting. Its availability in multiple languages, including English, Japanese, and Korean, reflects its global relevance.

### Technical Specifications
The Bourne shell is described in the Open Group Base Specifications, Issue 7, providing detailed documentation for its use and implementation. It is available as `/bin/sh` and is widely used in Unix-like operating systems, including Linux and BSD. The shell's semantic Scholar topic ID is 646915, indicating its importance in technical discussions.

## References

1. [Source](https://www.aosabook.org/en/bash.html)
2. Freebase Data Dumps. 2013
3. [The Open Group](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html)