Fact-checked by Grok 2 weeks ago

Unix shell

The Unix shell is a command-line interpreter that serves as the primary interface between users and operating systems, enabling the execution of commands, management of processes, and automation through scripting. It functions both interactively, where users enter commands at a , and non-interactively, by processing scripts containing sequences of commands, variables, structures, and operations. As a core component of Unix systems, the shell interprets user input, expands variables and wildcards, handles redirections and pipelines, and invokes other programs, thereby providing a flexible for system administration and application development. The history of the Unix shell traces back to the early 1970s, with developing the initial shell in 1971 for early versions of Unix, which supported basic command execution, redirection, and piping but lacked advanced scripting capabilities. Stephen Bourne developed the (sh), which was released with in 1979, adding essential scripting features such as loops, conditionals, variables, and command substitution, making it the foundational standard for Unix shells. Subsequent developments included Joy's (csh) in 1978 for BSD Unix, which introduced C-like syntax, command history, and aliases to enhance interactivity. The Korn shell (ksh), developed by David Korn in the 1980s, extended the with advanced features like functions, associative arrays, and job control, while maintaining . Key features of Unix shells, as standardized by , include tokenization of input into commands, parameter and command substitution expansions, field splitting for argument handling, pathname expansion for file matching, and support for compound commands like pipelines, loops, and conditionals. Redirection operators allow control over input and output streams, such as < for standard input and > for standard output, while quoting mechanisms preserve literal text or enable expansions. Major implementations continue to evolve; the Bourne-Again Shell (), released in 1989 as part of the GNU Project, combines elements of sh and ksh with additions like command-line editing and support, becoming the default shell on most distributions. These shells adhere to the POSIX Shell Command Language standard, ensuring portability across compliant systems.

Overview

Definition and purpose

The Unix shell is a command-line interpreter that provides a text-based interface to the operating system in systems. It functions by reading lines of input from the user, parsing them into commands and arguments, and executing the corresponding programs or system calls. The primary purposes of the Unix shell are to execute user commands, manage processes by spawning new ones for each invoked program, and enable scripting to automate repetitive tasks through sequences of commands stored in files. As an intermediary layer, the shell translates high-level user instructions into interactions, distinguishing it from the itself—which handles core system resources and —and from graphical user interfaces (GUIs), which use visual metaphors like windows and icons for interaction rather than text-based prompts. The shell's design draws inspiration from the command language of the operating system, including its general functions and nomenclature, with the first implementation created by in 1971 as part of the inaugural version of Unix at .

Usage modes

Unix shells operate in two primary modes: interactive and non-interactive, each tailored to different user needs and system operations. In interactive mode, the shell reads commands directly from the user's input, typically via a , and provides immediate feedback through prompts such as (defaulting to "$ ") for primary input and PS2 (defaulting to "> ") for continuations. This mode supports real-time interaction, where users enter commands one at a time and receive instant execution results, error messages, or output. Common features include command history for recalling previous inputs and programmable completion for suggesting arguments or filenames, enhancing efficiency during sessions. Unlike non-interactive execution, interactive shells do not automatically exit on certain errors, such as syntax issues in special built-ins, allowing users to correct mistakes on the fly. Non-interactive mode, in contrast, involves the shell reading and executing a sequence of commands from a file or string without user input, ideal for and . Here, the shell processes scripts sequentially, setting up an execution environment that supports portability across systems by adhering to standards like . Error handling is stricter; for instance, non-interactive shells with a non-zero upon encountering errors, redirection failures, or errors from special built-ins like cd or exit. This mode enables reliable , as scripts can run unattended, such as in jobs, without requiring access. Mode switching occurs through specific invocation methods. For example, the -c option forces non-interactive execution of a single command string, as in sh -c 'echo Hello', which reads the command from the argument rather than standard input. Scripts typically use a shebang line, such as #!/bin/[sh](/page/.sh), at the file's beginning to specify the shell interpreter, allowing the system to execute the file directly in non-interactive mode while ensuring portability (though results for shebang are implementation-defined). Interactive mode is the default when the shell starts with standard input connected to a terminal without non-option arguments. The benefits of interactive mode lie in its support for exploratory work and real-time corrections, with features like reducing repetition and completion minimizing typing errors. Non-interactive mode excels in and consistency, where predefined error handling prevents partial failures in scripted tasks, promoting reliability in system administration and . Together, these modes enable the to serve both ad-hoc user interactions and structured, repeatable processes.

History

Origins in early Unix

The Unix shell originated with the development of the Unix operating system at Bell Labs in the late 1960s. Ken Thompson implemented the initial shell, known as the Thompson shell, in 1971 as part of the first edition of Unix, running on a PDP-11/20 computer. This early shell functioned primarily as a basic command interpreter, reading user input lines, parsing them into commands and arguments, locating executable files typically in the /bin directory, and executing them in a forked process before returning control to the user with a prompt. It supported rudimentary wildcard expansion for filename patterns, such as using * to match multiple files, I/O redirection with < for input, > for output, and >> for append, as well as piping with | to chain commands, but lacked support for variables, control structures like loops or conditionals, and advanced scripting capabilities. The 's design drew significant influence from the operating system, on which and had previously worked. Multics introduced concepts like hierarchical file systems, which Unix adopted to organize directories and files in a tree structure accessible via pathnames, and interactive command-line interfaces that emphasized user-friendly syntax for file manipulation. Additionally, Multics' dynamic I/O stream redirection inspired early Unix features, which the Thompson shell implemented in a basic form. As Unix evolved in the 1970s, particularly with the Programmer's Workbench (PWB) version around 1975–1977, the saw incremental enhancements that introduced simple scripting capabilities. The PWB , also known as the Mashey and based on Thompson's design, added support for single-letter variables, structures such as and while loops, and switch statements, enabling basic command files for sequential execution with parameter substitution. These developments built on the core interpreter, including its existing redirection and , to facilitate automation of routine tasks, such as , while maintaining compatibility with earlier versions. Early Unix shells, including the implementation, had key limitations that constrained their utility for complex interactions. Notably, they lacked job control features, such as the ability to run processes in the background (&), suspend them (Ctrl-Z), or manage multiple jobs from a single session, requiring users to wait for each command to complete or use separate logins for parallelism. These shortcomings were later addressed in subsequent shells, such as the , which expanded on redirection and introduced variables and .

Bourne shell era

The Bourne shell was developed by Stephen Bourne at Bell Laboratories in 1977 and released as part of the Seventh Edition of Unix in 1979, replacing the earlier as the default command interpreter. This shell introduced significant advancements in scripting capabilities, establishing it as the first Unix shell to support variables, control structures such as statements and for loops, and user-defined functions, which allowed for more sophisticated command sequencing and automation. These features transformed the shell from a simple command executor into a programmable environment, enabling the creation of reusable scripts for system administration and user tasks. Key innovations in the Bourne shell included support for positional parameters, accessible via $1 for the first argument, * for all arguments as a single string, and @ for all arguments as separate quoted strings, facilitating argument passing in scripts. Arithmetic operations were handled through the external expr command, while signal handling was provided by the builtin, allowing scripts to respond to interrupts or other signals, such as cleaning up temporary files upon termination. These elements laid the groundwork for modern shell programming, emphasizing portability and integration with Unix commands. The Bourne shell quickly became the standard /bin/sh on Unix systems, serving as the foundation for AT&T's System V Unix and influencing subsequent commercial distributions. Its syntax, inspired by , prioritized scripting efficiency but drew criticism for being less intuitive for interactive use, lacking features like command history and job control that would enhance at the terminal. This limitation prompted the development of alternative shells better suited to everyday interaction, though the Bourne shell's design endured as the basis for standards.

C shell and diversification

The (csh) was developed by William Joy at the , between 1978 and 1979 as part of the Berkeley Software Distribution (BSD) of Unix. It introduced a syntax inspired by for control structures such as conditionals and loops, making it more familiar to C programmers compared to the Bourne shell's scripting-oriented design. Key interactive enhancements included a history mechanism allowing command reuse via substitutions like ! (e.g., !! to repeat the last command), and job control features such as suspending processes with Ctrl-Z and managing background jobs with %job notation, which were contributed by Jim Kulp. In the 1980s, the Tenex C shell (tcsh) emerged as a popular extension of csh, originally developed by Ken Greer at in the late 1970s and further refined into the 1980s. maintained backward compatibility with csh while adding advanced interactive capabilities, including programmable filename completion (e.g., Tab to expand partial paths), command-line editing with or key bindings, and enhanced alias support for abbreviating complex commands. These features addressed user demands for more ergonomic daily interaction, contrasting with the Bourne shell's emphasis on portable scripting. This period marked a diversification in Unix shell designs, driven by tensions between scripting portability—favored in System V Unix for its commercial focus—and interactive usability, which appealed to academic and research environments. The became the default login shell in BSD systems starting with 4BSD releases, reinforcing the divide between BSD's innovative, user-centric extensions and System V's adherence to the original for consistency across vendors. This split highlighted evolving user preferences, with csh and its derivatives prioritizing features like history and job control to streamline terminal sessions in multi-user settings.

Standardization and evolution

The standardization of the Unix shell emerged in the late 1980s as part of broader efforts to promote portability across Unix variants, culminating in the POSIX.2 standard developed by IEEE Working Group 1003.2. This standard, formally known as IEEE Std 1003.2-1992, was ratified in September 1992 after approximately six years of development and defined a minimal, compliant command for the (sh), ensuring consistent behavior for core scripting elements like variable expansion, , and pipelines. Key additions included enhancements to the test command for more robust conditional evaluations, such as support for string comparisons and file tests, and the getopts utility for standardized parsing of command-line options in scripts. It also incorporated job control mechanisms, such as the , , and utilities, derived from earlier innovations in BSD and Korn shells, enabling users to manage multiple processes asynchronously from interactive sessions. Following its initial publication, the POSIX shell specification evolved through ongoing revisions managed jointly by IEEE and The Open Group, which assumed maintenance responsibilities and integrated it into the . Subsequent updates, including POSIX.1-2001 and POSIX.1-2008, refined the core language while emphasizing portability without mandating advanced constructs like named arrays, prioritizing a lean baseline over expansive features to avoid fragmentation. In the post-1990s era, the standard profoundly influenced open-source ecosystems, particularly through the Project's shell, which implemented full compliance in its POSIX mode and became the default in most distributions, facilitating widespread adoption of standardized scripting practices. This integration supported the proliferation of systems while allowing extensions for contemporary needs, such as improved and utility alignments. A persistent in this evolution has been balancing backward compatibility with legacy scripts against the introduction of new capabilities, such as coprocesses for bidirectional , which remain non-standard extensions in specific implementations rather than core features. Standardization bodies have navigated this by focusing on minimal viable enhancements, ensuring scripts remain portable across compliant environments without requiring proprietary additions.

Core features

Command execution

The Unix shell processes user input by first reading a line from standard input or a file and it into , which are sequences of characters treated as words or operators. This tokenization follows rules that distinguish between quoted strings, variables, and literal text, ensuring that spaces and other delimiters separate arguments correctly. For instance, the input ls -l file.txt is tokenized into the command "ls", the option "-l", and the argument "file.txt". After tokenization and initial expansions like variable substitution, the shell performs field splitting on the results using the IFS (Internal Field Separator) variable, which defaults to space, tab, and newline, to further divide words into fields. Following parsing, the shell applies filename expansion, also known as globbing, to match patterns against existing files and directories in the current . Patterns such as * (matching any string), ? (matching a single character), and [abc] (matching one of a set) are expanded into lists of matching pathnames; if no matches exist, the original pattern is retained unless the nullglob option is set in some implementations. For example, entering echo *.txt expands to the names of all files ending in ".txt" if any exist, otherwise it echoes the literal "*.txt". This expansion occurs after field splitting but before command execution, and it requires appropriate read and search permissions on directories. To execute a command, the shell first checks if it is a built-in utility or requires searching external executables via the environment variable, a colon-separated list of directories defining the search order. If the command name contains no slashes, the shell searches each directory in for an matching the name, starting from the leftmost directory; the first match is used. Some shells, such as , maintain a to locations of recently executed commands, speeding up subsequent lookups by avoiding repeated scans. If the command is not found, the shell reports an error like "command not found" and sets the to 127. Built-in commands are implemented directly within the and execute in the current environment without spawning a new , allowing efficient operations that affect the shell state, such as cd which changes the current working directory. In contrast, external commands are separate executable programs found via , and the shell executes them by forking a and using the exec family of system calls (e.g., execl) to replace the image with the target program. For example, ls is typically an external command, requiring this fork-exec mechanism, while echo may be built-in in some shells for performance. distinguishes special built-ins (e.g., export, cd) that have side effects on the shell environment and may cause the shell to exit on errors, from regular built-ins which do not. The shell handles errors during execution by capturing the of the most recent command, accessible via the special parameter $?, which holds an integer value from 0 to 255 where 0 indicates success. Non-zero values signal failure; for instance, 126 means the command was found but not executable, and 127 indicates not found. Commands print diagnostic messages to for issues like permission denied, and the overall script or interactive session can use $? to implement conditional logic based on these statuses. In interactive mode, the shell typically continues after errors, but in scripts, unhandled non-zero exits may propagate to terminate the script.

Input/output redirection

Input/output redirection in the Unix shell provides mechanisms to alter the default sources and destinations of a command's input and output streams, enabling flexible data handling without modifying the commands themselves. This feature, a core aspect of shell functionality, supports directing standard input (stdin) from files or inline content, routing standard output (stdout) to files or other commands, and managing (stderr) separately or merged. These operators are applied to simple commands or pipelines, enhancing modularity in command-line operations. The basic redirection operators include < for stdin from a , > for stdout to a (overwriting if it exists), and >> for appending stdout to a . For example, command < inputfile reads stdin from inputfile, while command > outputfile writes stdout to outputfile, truncating it if present; command >> outputfile appends instead. These operators default to file descriptor 0 for input and 1 for output but can be prefixed with a descriptor number, such as 2> errorfile to redirect stderr to errorfile. The >| variant forces overwriting even if the noclobber option is set, preventing accidental data loss. Unix shells use file descriptors to manage multiple streams, with 0 representing stdin, 1 for stdout, and 2 for stderr by convention. Redirections can duplicate or merge these, such as 2>&1 to send stderr to the same destination as stdout, or >&2 to redirect stdout to stderr. Closing a descriptor uses >&- or <&-, and opening a file for both reading and writing employs <> , as in exec 3<> sharedfile to assign descriptor 3. These capabilities allow precise control over error handling and logging in command sequences. Here documents provide a way to supply multi-line input directly in the command line using <<[delimiter](/page/Delimiter), where the shell reads subsequent lines until encountering the alone on a line, treating them as stdin for the command. For instance:
[cat](/page/Cat) <<EOF
This is multi-line
input for the command.
EOF
This outputs the enclosed text. The <<- variant strips leading tabs from the input lines and for indentation in scripts. If the is quoted, variable expansions and command substitutions are suppressed, ensuring literal input. Pipes, denoted by |, connect the stdout of one command to the stdin of the next, facilitating unidirectional data streaming and command composition. An example is ls | grep pattern, where ls output filters through grep for lines containing "pattern". Multiple pipes form chains, like ps aux | grep process | awk '{print &#36;1}', processing data sequentially across commands. This mechanism underpins the Unix philosophy of small, composable tools.

Scripting elements

Shell scripting in Unix shells incorporates fundamental programming constructs that allow for conditional execution, , and modular code organization, enabling the automation of complex tasks through scripts saved in files and executed via the shell interpreter. These elements are standardized in the shell command language, providing a portable foundation across compliant implementations. Control structures facilitate decision-making and repetition in scripts. The statement evaluates a compound list and executes a corresponding clause if its exit status is zero; multiple clauses allow for chained conditions, with an optional for the default case, all terminated by fi. For multi-way branching, the statement matches a word against patterns, executing the compound list associated with the first matching pattern and ending with esac. Iteration is supported by loops: a loop assigns successive words from a list (or positional parameters if omitted) to a variable and executes a compound list for each, bounded by do and done; a loop repeats its body as long as the condition compound list succeeds (exit status zero); conversely, an loop continues until the condition succeeds. Functions promote by defining named blocks of commands. They are declared using the syntax name() compound-list, where the compound list forms the body; upon invocation, the function executes in the current with to positional parameters shifted accordingly. Within functions, the local special built-in utility declares variables local to the function's , preventing interference with the global . The of a function matches that of its last command or zero if none is executed. Arithmetic operations in shell scripts are limited to computations, with no native support for . The arithmetic expansion $((expression)) evaluates an expression—supporting operators like , , , , and —and substitutes the result, after performing parameter and command substitutions within the expression. Complementarily, the let built-in evaluates one or more arithmetic expressions as arguments, setting variables to their results if applicable. For example, to compute the sum of two variables a and b into c, one might use let "c = a + b" or c=$((a + b)). These mechanisms handle signed integers within the shell's implementation-defined range. Quoting mechanisms word expansion and to preserve literal text or selectively enable features like . Single quotes ('text') treat all enclosed characters literally, suppressing expansions except for the inability to nest single quotes. Double quotes ("text") preserve literals but allow dollar-sign parameter expansion, backquote command , and escapes for specific characters. A (\) immediately before a non-special character preserves its literal value, while before special characters like $ or `, it escapes their meaning; a trailing continues a line without executing it. These rules ensure precise over behavior, such as preventing globbing or word splitting in arguments.

Configuration

Startup files

When a Unix shell starts, it executes a of configuration files known as startup files to initialize the , set variables, and define user preferences. These files differ based on whether the shell is invoked as a login shell (typically at terminal login or with the --login option), an interactive non-login shell (such as opening a new terminal window), or a non-interactive shell (running scripts). The behavior varies across shell implementations, but common patterns exist for POSIX-compliant shells like and enhanced variants like and . Global startup files, such as /etc/, provide system-wide configurations and are usually read first by login shells across many Unix implementations. This file sets default environment variables and paths applicable to all users. User-specific files, located in the (prefixed by ~), allow customization; for example, ~/.profile serves as the primary user file in -style shells. In practice, login shells execute /etc/ followed by ~/.profile, though does not strictly mandate this sequence—it is a widely adopted convention in Unix systems. Shell-specific files address non-login interactive sessions or additional behaviors. For , an interactive non-login shell sources ~/.bashrc after checking for its existence, while login shells prioritize ~/.bash_profile (or fallback to ~/.bash_login or ~/.profile if absent). The execution order for login shells is: /etc/profile, then the first readable among ~/.bash_profile, ~/.bash_login, or ~/.profile. For the (csh or ), every shell invocation reads ~/.cshrc (after global /etc/csh.cshrc), but login shells additionally execute ~/.login (after global /etc/csh.login). Non-login s skip the .login files. Common customizations in these files include modifying the environment variable to include user directories or binaries, and setting up aliases for frequently used commands, such as aliasing 'll' to 'ls -l' for convenience. These adjustments ensure a tailored interactive without altering system defaults. Environment variables initialized here, like PATH, influence subsequent shell behavior.

Environment setup

In Unix shells, the runtime environment is managed through environment variables, which are name-value pairs passed to processes and their children. These variables can be set using the assignment syntax VAR=value within the shell, but to make them available to child processes, the export special built-in command is used, such as export VAR=value or simply export VAR after assignment. Exported variables are inherited by subprocesses invoked by the shell, forming the environment that influences command execution and application behavior across the process hierarchy. Several common environment variables are widely used to customize the shell's interaction with the user and system. For instance, HOME specifies the path to the user's , USER identifies the current username (though not strictly mandated by POSIX, it is a conventional variable in many implementations), PS1 defines the format of the primary command prompt (e.g., expanded to include the and current directory), and MAIL points to the path of the user's file for mail notification checks. These variables are typically initialized during shell startup from profile files and can be exported to ensure persistence in child processes. Shell options provide fine-grained control over execution behavior and resource constraints, adjustable via the set special built-in command. The -x option enables by printing each command and its arguments as it is executed (before ), aiding in tracing script flow. Similarly, the -e option causes the shell to exit immediately if any simple command terminates with a non-zero status, promoting robust error handling in s. Resource limits, such as the maximum writable by the shell and its children, are managed with the ulimit (also accessible as a shell built-in), for example ulimit -f 1024 to restrict files to 1024 blocks. For temporary modifications without affecting the parent shell, the env utility allows overriding or unsetting variables in a subprocess . Invoked as env VAR=value command, it executes the specified command with the altered environment, isolating changes to that invocation and its descendants while preserving the original shell state. This approach is particularly useful for running applications with custom configurations, such as env PATH=/opt/bin:$PATH myapp, ensuring the modification does not propagate upward.

Shell variants

POSIX shells

POSIX shells refer to Unix command-line interpreters that implement the Shell and Utilities specification, as defined in IEEE Std 1003.1 and maintained by The Open Group, ensuring a standardized set of behaviors for command execution, scripting, and utility interfaces across compliant systems. This standard mandates a core command language for the sh utility, emphasizing portability without proprietary extensions. A prominent example is the Debian Almquist Shell (), a lightweight derivative of the original (), designed specifically to serve as the POSIX-compliant /bin/sh on systems like and . Other POSIX-compliant implementations include ash, commonly used in embedded systems for its minimal footprint. Key features of POSIX shells include a required set of built-in commands, such as read for input handling and test (or its synonym [) for conditional expressions, which must be available without relying on external binaries to support essential scripting constructs. These shells adhere strictly to the specification's syntax for pipelines, redirections, and variable expansions, but deliberately omit advanced features like associative arrays or non-POSIX globbing patterns to maintain compatibility. Special built-ins, including export, set, and trap, are also mandated to handle environment and signal management in a predictable manner. In practice, POSIX shells are the default choice for system scripts and portable code, invoked via the #!/bin/[sh](/page/.sh) shebang, which guarantees execution on any POSIX-conforming system regardless of the underlying shell implementation. Distributions like prioritize for /bin/sh due to its efficiency in startup time and resource usage compared to feature-rich alternatives, making it ideal for boot scripts and utilities. This focus on minimalism ensures broad interoperability, as scripts written for POSIX sh run unchanged on diverse environments, from embedded systems to servers. However, POSIX shells have limitations in interactive use, lacking enhancements such as command-line editing, history navigation, or tab completion, which are absent from the standard to preserve simplicity and avoid vendor-specific behaviors. As a result, while they excel in scripted, automated tasks requiring reliability across platforms, users often turn to extended shells like or Zsh for daily interactive sessions where features are prioritized over strict adherence.

Enhanced and modern shells

The Korn shell (ksh), developed by David Korn at Bell Laboratories and first announced in 1983, introduced significant enhancements over earlier shells, including support for arrays, built-in , and advanced capabilities such as extended globbing with constructs like *(pattern), ?(pattern), and !(pattern) for more flexible file selection and string manipulation. The ksh93 version, released in 1993, further expanded these with associative arrays via the typeset -A command and improved floating-point precision using double or arithmetic where supported. The GNU Bourne-Again SHell (Bash), created in 1989 by Brian Fox as part of the GNU Project, became the de facto standard shell for distributions due to its POSIX compatibility combined with user-friendly extensions like brace expansion (e.g., {a..z} to generate sequences) and (e.g., <(command) to treat command output as a file). These features enable concise scripting for tasks such as generating file lists or integrating command outputs seamlessly, making Bash the default login shell in major distributions like , , and as of 2025. Z shell (Zsh), first released in 1990 by Paul Falstad, emphasizes extensibility through loadable modules for adding functionality like advanced editing modes and is renowned for its sophisticated system, which predicts arguments based on context, history, and man pages. It also supports theme customization for prompts and shared history across sessions, enhancing interactive use; the open-source Oh My Zsh framework, launched in 2009, has popularized these traits by providing thousands of plugins and themes, fostering widespread adoption among developers for its balance of power and ease. Among modern shells, (Friendly Interactive SHell), initially released in 2005 by Axel Liljencrantz, prioritizes user-friendliness with out-of-the-box , autosuggestions from history, and tab completions that require no initial configuration, diverging from traditional shells by embedding these as core behaviors rather than optional setups. Similarly, Nushell, which reached its first public release in 2019 and has evolved rapidly through the 2020s, revolutionizes data handling by treating pipeline outputs as structured records, lists, or tables instead of plain text, enabling queries like ls | get name to extract fields directly without parsing tools. is used in some containers for its simplicity in workflows.

References

  1. [1]
    Unix / Linux - What is Shells? - Tutorials Point
    A shell provides you with an interface to the Unix system. It gathers input from you and executes programs based on that input.<|control11|><|separator|>
  2. [2]
    2. Shell Command Language
    The shell is a command language interpreter. This chapter describes the syntax of that command language as it is used by the sh utility and the system() and ...
  3. [3]
    [PDF] Introduction to UNIX Shells - Higher Education | Pearson
    The shell is a special program used as an interface between the user and the heart of the. UNIX operating system, a program called the kernel, ...
  4. [4]
    Evolution of shells in Linux - IBM Developer
    Dec 9, 2011 · Ken Thompson (of Bell Labs) developed the first shell for UNIX called the V6 shell in 1971. Similar to its predecessor in Multics, this shell (/ ...
  5. [5]
    History of UNIX Shells - Learning the bash Shell, Second Edition ...
    The first major shell was the Bourne shell (named after its inventor, Steven Bourne); it was included in the first popular version of UNIX, Version 7, starting ...
  6. [6]
    sh
    ### Extracted Sections
  7. [7]
    [PDF] The UNIX Time- Sharing System
    with the aid of a program called the Shell. The Shell is a command line interpreter: it reads lines typed by the user and interprets them as requests to ...
  8. [8]
    Shell vs. Kernel vs. API | Baeldung on Computer Science
    Mar 18, 2024 · The shell functions as a user-level program running on top of the kernel as an interface between users and the operating system.
  9. [9]
    The birth of the Bash shell - Opensource.com
    A little shell history: In 1971, Ken Thompson released the first Unix shell—the Thompson shell. But there were severe limitations to the amount of scripting ...It Started With Unix · Bourne Shell Is A Step... · Rethinking Bourne's Shell As...
  10. [10]
  11. [11]
  12. [12]
  13. [13]
  14. [14]
  15. [15]
  16. [16]
  17. [17]
  18. [18]
  19. [19]
  20. [20]
    [PDF] An Introduction to the UNIX Shell S. R. Bourne Bell Laboratories ...
    Nov 1, 1977 · The shell is a command programming language that provides an interface to the UNIX† operating system. Its features include control-flow ...
  21. [21]
    [PDF] An Introduction to the C shell - FreeBSD Documentation Archive
    William Joy ... Pro- grams developed at UC Berkeley liv e in '/usr/ucb', while locally written programs live in. Page 34. USD:4-34. An Introduction to the C shell.
  22. [22]
    An Introduction to the C shell - FreeBSD Documentation Archive
    Csh is a new command language interpreter for UNIXsystems. It incorporates good features of other shells and a history mechanism similar to the redo of ...Missing: Bill | Show results with:Bill
  23. [23]
    [PDF] History of Command Shells - edX
    tcsh was originally developed by Ken Greer at Carnegie Mellon University in the late 1970's; the t in tcsh stands for TENEX, an operating system that was ...
  24. [24]
    Features of the TCSH Shell - Linux Journal
    Mar 1, 1997 · In this article, I will describe some of the main features of TCSH, which I believe make it worth using as the primary log in shell.
  25. [25]
    [PDF] BSD UNIX
    A new user interface (the C Shell), a new text editor (ex/vi), compilers for Pascal and LISP, and many new systems programs were written at Berkeley. For 4.2 ...
  26. [26]
    The Differences Between BSD and System V Unix | Daniel Miessler
    Jan 24, 2016 · BSD is considered "university Unix", or hobbyist Unix, because it came out of UC Berkeley in California. System V was considered more commercial ...
  27. [27]
    Bash POSIX Mode (Bash Reference Manual) - GNU.org
    The POSIX Shell and Utilities standard was originally developed by IEEE Working Group 1003.2 (POSIX. ... Open Group and ISO/IEC SC22/WG15). Today the Shell ...
  28. [28]
    [Appendix A] A.2 The IEEE 1003.2 POSIX Shell Standard
    2, covering the shell, utility programs, and user interface issues, was ratified in September 1992 after a six-year effort. The POSIX standards were never meant ...
  29. [29]
    [PDF] A Brief POSIX Advocacy: Shell Script Portability - USENIX
    They are both backward-compatible with the Bourne shell but aim at providing more advanced functions and better usability. A Step by Step Normalization. Back in ...
  30. [30]
    SC3032 – In POSIX sh, coproc is undefined. - ShellCheck
    Your script uses a shell feature not supported by the shebang. Either rewrite the script to be portable, or change the shebang to explicitly require a shell ...
  31. [31]
  32. [32]
  33. [33]
  34. [34]
  35. [35]
  36. [36]
  37. [37]
  38. [38]
  39. [39]
  40. [40]
  41. [41]
  42. [42]
    The Bash Shell Startup Files - Linux From Scratch!
    This shell invocation normally reads /etc/profile and its private equivalent ~/. bash_profile (or ~/. profile if called as /bin/sh) upon startup.
  43. [43]
    Bash Startup Files (Bash Reference Manual)
    ### Summary of Bash Startup Files
  44. [44]
    csh(1) - User Commands
    May 20, 2010 · Read at beginning of execution by each shell. ~/.login. Read by login shells after .cshrc at login. ~/.logout. Read by login shells at logout.
  45. [45]
    Environment Variables
    Environment Variable Definition ; HISTORY, MAIL, PRINTER ; HISTSIZE, MAILCHECK, PROCLANG ; HOME, MAILER, PROJECTDIR ...Missing: common | Show results with:common
  46. [46]
    env - The Open Group Publications Catalog
    The env utility shall obtain the current environment, modify it according to its arguments, then invoke the utility named by the utility operand with the ...
  47. [47]
    IEEE 1003.2-1992 - IEEE SA
    Superseded Standard. IEEE 1003.2-1992. IEEE Standard for Information Technology--Portable Operating System Interfaces (POSIX(TM))--Part 2: Shell and Utilities.
  48. [48]
    dash(1) - Linux manual page - man7.org
    The only way to un-export a variable is to unset it. The shell allows the value of a variable to be set at the same time it is exported by writing export name= ...
  49. [49]
    Debian -- Details of package dash in sid
    The Debian Almquist Shell (dash) is a POSIX-compliant shell derived from ash. Since it executes scripts faster than bash, and has fewer library dependencies.Missing: definition 2 spec
  50. [50]
    A tale of two shells: bash or dash - LWN.net
    A reoccurring topic on Debian lists is the use of dash (Debian Almquist Shell) as opposed to bash (GNU Bourne-Again Shell).Missing: definition | Show results with:definition
  51. [51]
    The New KornShell&mdash;ksh93 - Linux Journal
    Jul 1, 1996 · The KornShell, written by David Korn at Bell Telephone Laboratories, combined the best features of both of these shells, and added the ...
  52. [52]
    4. Basic Shell Programming - Learning the Korn Shell [Book] - O'Reilly
    The Korn shell has some of the most advanced programming capabilities of any command interpreter of its type. Although its syntax is nowhere near as elegant or ...
  53. [53]
    KSH-93 - Frequently Asked Questions - KornShell
    The only major new interactive feature is key binding. Major new language features are floating point arithmetic, associative arrays, complete ANSI-C printf ...
  54. [54]
    Enhanced Korn shell (ksh93) - IBM
    An associative array is an array with a string as an index. The typeset command used with the -A flag allows you to specify associative arrays within ksh93. For ...
  55. [55]
    GitHub - ksh93/ksh: ksh 93u+m: KornShell lives! - GitHub
    Arithmetic: KSH-93 allows you to do integer arithmetic in any base from two to sixty-four. You can also do double precision floating point arithmetic.
  56. [56]
    [PDF] Bash − The GNU shell* - Technology Infrastructure Services
    †Bill Joy, An Introduction to the C Shell, UNIX User's Supplementary Documents, University of California at. Berkeley, 1986. Page 4. -4- only for interactive ...
  57. [57]
    bash(1): GNU Bourne-Again SHell - Linux man page
    Bash removes braces from words as a consequence of brace expansion. For example, a word entered to sh as file{1,2} appears identically in the output. The ...
  58. [58]
    How To Change Shell To Bash in Linux / Unix - nixCraft
    Feb 11, 2025 · You can change your default shell using the chsh (“change shell” ) command as follows. The syntax is: $ chsh $ chsh -s {shell-name-here}
  59. [59]
    Understanding The Different Shell In Linux : Zsh Shell
    Sep 6, 2012 · The first version of Zsh was created in 1990 by a Princeton Student named Paul Falstad. The name “Zsh” supposedly comes from the connection ID ...
  60. [60]
    My favourite Zsh features - JoeJag
    Nov 14, 2014 · I've collected tab completions, aliases and functions that help get repetitive tasks done quick. ... oh-my-zsh has a bunch out of the box too.Missing: 1990 extensible modules theme
  61. [61]
    Oh My Zsh - a delightful & open source framework for Zsh
    Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions.Missing: 1990 extensible modules completion
  62. [62]
    ohmyzsh/ohmyzsh - GitHub
    A delightful community-driven (with 2400+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, ...Installing ZSH · Themes · Oh My Zsh · Plugins
  63. [63]
    New features in the fish shell - LWN.net
    Sep 29, 2020 · It features a modern command-line interface with syntax highlighting, tab completion, and auto-suggestions out of the box (all with no configuration required).
  64. [64]
    Tutorial — fish-shell 4.1.2 documentation
    Fish is a fully-equipped command line shell (like bash or zsh) that is smart and user-friendly. Fish supports powerful features like syntax highlighting, ...Fish for bash users · Interactive use · Writing your own completionsMissing: 2005 | Show results with:2005
  65. [65]
    Celebrating 4 years of Nushell
    Aug 23, 2023 · Nushell turns 4 years old! Today marks 4 years since Nushell's first public release. In that time, Nushell has grown and changed, ...
  66. [66]
    Nushell
    Nushell is a new, cross-platform shell that uses structured data for pipelines and works on Linux, macOS, BSD, and Windows.Nu as a Shell · Installing Nu · Book · Command Reference<|separator|>
  67. [67]
    Linux Shell Customization 2025: Ultimate Guide to Bash, Zsh, and ...
    May 5, 2025 · Master Linux shell customization 2025 with Bash, Zsh, and Fish. Learn how to boost productivity using themes, plugins, and cross-platform ...Missing: adoption Nushell