We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is the Bourne Shell?

By S.A. Keel
Updated: May 16, 2024

The Bourne shell is a small program that runs on Unix® and LINUX® operating systems and provides an interface to execute programs on the system. It is often referred to as a command line interface, or command interpreter, as it provides no graphical user interface (GUI) to the user. Commands, and any necessary parameters, to be executed are typed into the shell. The Bourne shell is also a scripting language, allowing users to create and execute script files that can process data through multiple programs by way of a single command. On Unix®-like systems, the program is simply known as "sh."

The first such shells for Unix® systems were known as the Thompson shell, created by Ken Thompson, one of the original creators of the Unix® operating system. The Thompson shell was limited to command interpretation, and a number of additional functions had to be executed as external operations. Later, Stephen Bourne created the Bourne shell to replace the Thompson shell, adding a number of new features into the shell itself, as well as the shell's scripting language.

In reality, the Bourne shell was planned as a scripting language from the get-go. While it was still the command line interface for Unix® version seven, it also opened up the possibility for users to develop shell scripts that would link commands together in order to process data. Through the use of this programming, the user could establish variables for capturing known or unknown data from input or output and manipulate the processing of that data through the use of conditional statements in the script via a technique referred to as control flow.

This was also the first shell to implement a feature known as signal handling. Through the Bourne shell, a user can send a specific type of signal to a process already running on the computer, instructing that process to do something else. Many of these are ways to stop a process that is executing and produce some sort of output that can be used for debugging, though others exist to temporarily halt a process, resume, and so forth.

The ability to directly control file descriptors was another first for the Bourne shell. On a Unix®-like system, every running program has a table that lists the file descriptors for any open files. This can include anything from a simple text file to a directory or even the communication sockets that processes use to share data with each other. For a user to have control over the file descriptors on a system allowed for unprecedented control over input and output for virtually everything on the computer.

Of course, even though the Bourne shell offered such additional functionality to users, it was lacking in features such as the ability to control processes interactively, establish command aliases, and retain a history. Later, however, a number of descendants began to emerge that took the most useful shell features that had been devised over the years and rolled them up into new shells. One common example is the Bourne-again shell, or Bash, which is common on many LINUX® systems. As a result, many of these descendants are fully capable of executing regular Bourne shell scripts, giving every Unix®-like system some implementation of the original Bourne shell in one way or another. On many LINUX® systems, this is simply a link from "sh" to "bash" or some other capable descendant.

EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Discussion Comments
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.