Bash is not the only shell available in Linux.
Here are a few more you should probably be aware of:
Here are a few more you should probably be aware of:
๐ญ. ๐ง๐ต๐ฒ ๐๐ผ๐๐ฟ๐ป๐ฒ ๐ฆ๐ต๐ฒ๐น๐น (๐๐ต)
The Bourne shell, developedย at AT&T Bell Labs by Steve Bourne in 1979, is widely regarded as the first defaultย UNIX shell.
The shell program name is sh and usually located atย /bin/.
The Bourne shell, developedย at AT&T Bell Labs by Steve Bourne in 1979, is widely regarded as the first defaultย UNIX shell.
The shell program name is sh and usually located atย /bin/.
It became popular due to its small size and high operating speeds. The Bourne shell, on the other hand, has some significant drawbacks.
- It lacks built-in functionality to handle logical and arithmetic operations.
- It lacks built-in functionality to handle logical and arithmetic operations.
- Furthermore, unlike the majority of Linux shells, the Bourne shell cannot recall previously used commands.
- It also lacks comprehensive features that would allow it to be used interactively.
- It also lacks comprehensive features that would allow it to be used interactively.
The Bourne shell's full pathname is /bin/sh or /sbin/sh or sometimes /usr/bin/sh . It uses the prompt # for the root user and $ for non-root users by default.
๐ฎ. ๐ ๐ฆ๐ต๐ฒ๐น๐น (๐ฐ๐๐ต)
The C shell (csh) is a late 1970s Linux shell developed at the University of California by Bill Joy whose main goal was to improve interactive use and mimic the C language.
The C shell (csh) is a late 1970s Linux shell developed at the University of California by Bill Joy whose main goal was to improve interactive use and mimic the C language.
Because the Linux kernel is primarily written in C, the shell strives to provide stylistic consistency throughout the system.
The cshell binary is located in /bin/csh or /usr/bin/csh . For regular users, the prompt is %, and for the root user, it is #.
The cshell provides new interactive features such as:
- User-defined aliases for programs.
- Built-in expression grammar.
The cshell provides new interactive features such as:
- User-defined aliases for programs.
- Built-in expression grammar.
- Relative home directory (~).
- It included command history, which was lacking in other types of Linux shells such as the Bourne shell.
- It included command history, which was lacking in other types of Linux shells such as the Bourne shell.
On the other hand, the chshell has also some significant drawbacks.
- Standard input/output (stdio) file handles and functions are not supported.
- Inconsistencies in syntax.
- Standard input/output (stdio) file handles and functions are not supported.
- Inconsistencies in syntax.
- Because it is not fully recursive, complex command handling is limited.
When compared to the Bourne shell, the C shell improved readability and performance. All subsequent Unix shells were influenced by csh's interactive features and innovations.
When compared to the Bourne shell, the C shell improved readability and performance. All subsequent Unix shells were influenced by csh's interactive features and innovations.
๐ฏ. ๐ง๐ต๐ฒ ๐๐ผ๐ฟ๐ป ๐ฆ๐ต๐ฒ๐น๐น (๐ธ๐๐ต)
The KornShell (ksh) is a Unix shell and language based on the Bourne shell (sh) developed by David Korn at AT&T Bell Labs in the early 1980s.
The KornShell (ksh) is a Unix shell and language based on the Bourne shell (sh) developed by David Korn at AT&T Bell Labs in the early 1980s.
It not only supports everything that the Bourne shell would support, but it also adds new features. It has built-in support for arithmetic operations as well as interactive features similar to the C shell.
The Korn shell executes Bourne shell scripts and provides Object-oriented programming, extensibility of built-in commands, string, array, and function manipulation similar to the C programming language. Scripts written for the C shell are also supported.
Furthermore, it is faster than the majority of Linux shells, including the C shell.
The Korn shell's complete pathname is /bin/ksh. It uses the prompt # for the root user and $ for non-root users by default.
The Korn shell's complete pathname is /bin/ksh. It uses the prompt # for the root user and $ for non-root users by default.
๐ฐ. ๐ง๐๐ก๐๐ซ ๐ ๐ฆ๐ต๐ฒ๐น๐น (๐๐ฐ๐๐ต)
The TENEX C shell (tcsh) is a fork of the C shell (csh), which was merged in the early 1980s. The shell is backward compatible with csh and incorporates TENEX OS features and concepts.
The TENEX C shell (tcsh) is a fork of the C shell (csh), which was merged in the early 1980s. The shell is backward compatible with csh and incorporates TENEX OS features and concepts.
The path to the TENEX C shell executable is /bin/tcsh. Tcsh was used in early versions of Mac OS and as the default root shell in FreeBSD.
The shell also has the following additional features:
- advanced command history.
- autocomplete that can be programmed.
- wildcard matching.
- job management.
- built-in where command.
Because tcsh is an extension of the C shell, many drawbacks remain in the extended version.
- advanced command history.
- autocomplete that can be programmed.
- wildcard matching.
- job management.
- built-in where command.
Because tcsh is an extension of the C shell, many drawbacks remain in the extended version.
๐ฑ. ๐ง๐ต๐ฒ ๐ญ ๐ฆ๐ต๐ฒ๐น๐น (๐๐๐ต)
The Z Shell, or zsh, is a sh shell extension with numerous customization options. The zsh shell is what you're looking for if you want a modern shell with all the features and more.
The Z Shell, or zsh, is a sh shell extension with numerous customization options. The zsh shell is what you're looking for if you want a modern shell with all the features and more.
The following are some notable features of the z shell:
- Create filenames based on the conditions you provide.
- Support for plugins and theming
- Index of pre-installed functions
- Completion of commands, among other things
- Create filenames based on the conditions you provide.
- Support for plugins and theming
- Index of pre-installed functions
- Completion of commands, among other things
Because of the community-driven support provided by the Oh My Zsh framework, the shell is highly configurable and customizable.
๐ฒ. ๐๐ฒ๐ฏ๐ถ๐ฎ๐ป ๐๐น๐บ๐พ๐๐ถ๐๐ ๐ฆ๐ต๐ฒ๐น๐น (๐ฑ๐ฎ๐๐ต)
The Debian Almquist Shell (dash) is a Unix shell that evolved from the Almquist shell (ash), which was ported to Debian and renamed.
The Debian Almquist Shell (dash) is a Unix shell that evolved from the Almquist shell (ash), which was ported to Debian and renamed.
Dash is well-known as the default shell for Ubuntu and Debian. The shell is lightweight and POSIX-compliant, making it ideal for OS startup scripts.
On Ubuntu and Debian, the executable path is /bin/dash, with /bin/sh pointing to it.
On Ubuntu and Debian, the executable path is /bin/dash, with /bin/sh pointing to it.
The default and root user prompts are identical to those in the Bourne shell.
Dash has the following features:
- The execution speed is up to four times faster than that of bash and other shells.
Dash has the following features:
- The execution speed is up to four times faster than that of bash and other shells.
- When compared to alternatives, it requires the least amount of disk space, CPU, and RAM
The main disadvantage is that dash is incompatible with bash. Dash-less features are referred to as "bashisms." As a result, bash scripts require additional bashism reworkings to run successfully.
๐ณ. ๐๐ฟ๐ถ๐ฒ๐ป๐ฑ๐น๐ ๐๐ป๐๐ฒ๐ฟ๐ฎ๐ฐ๐๐ถ๐๐ฒ ๐ฆ๐ต๐ฒ๐น๐น (๐ณ๐ถ๐๐ต)
The Friendly Interactive Shell (fish) is a Unix shell designed with usability in mind that was released in the mid-2000s.
The Friendly Interactive Shell (fish) is a Unix shell designed with usability in mind that was released in the mid-2000s.
The feature-rich shell requires no additional configuration, making it user-friendly right away.
The fishย shell has the following features:
- Based on the current directory history, advanced suggestions/tab completion are provided.
The fishย shell has the following features:
- Based on the current directory history, advanced suggestions/tab completion are provided.
- Syntax highlighting is useful, and error messages are descriptive.
- Configuration via the internet.
- Command history with search capabilities.
- Configuration via the internet.
- Command history with search capabilities.
The main disadvantage of fish is that it is non-POSIX compliant. However, the developers intend to improve POSIX's flawed designs.
๐ด. ๐๐ผ๐๐ฟ๐ป๐ฒ ๐๐ด๐ฎ๐ถ๐ป ๐ฆ๐ต๐ฒ๐น๐น (๐ฏ๐ฎ๐๐ต)
In case you're unfamiliar with bash. The Bourne Again shell is a Unix shell and command language that was developed in 1989 as an extension of the Bourne shell (sh).
In case you're unfamiliar with bash. The Bourne Again shell is a Unix shell and command language that was developed in 1989 as an extension of the Bourne shell (sh).
Many Linux distributions and earlier versions of macOS use the shell program as their default login shell.
The shell's name is bash, and its location is /bin/bash. The bash prompt, like the Bourne shell, is $ for a regular user and # for root.
The shell's name is bash, and its location is /bin/bash. The bash prompt, like the Bourne shell, is $ for a regular user and # for root.
Bash adds features not found in the Bourne shell, such as:
- Command completion.
- Command history.
- Basic signal processing and debugging.
- Provides brace expansion
- Supports heredoc
- Command completion.
- Command history.
- Basic signal processing and debugging.
- Provides brace expansion
- Supports heredoc
- Conditional commands, such as the bash if and bash case statements.
Because bash is a superset of the Bourne shell, most sh scripts will run in bash without modification.
Because bash is a superset of the Bourne shell, most sh scripts will run in bash without modification.
Shells are among the most powerful tools available to Linux users, if not the most powerful. It is nearly impossible to use the features and functionality provided by the kernel installed on a system without shells.
That concludes today's thread! Thank you for reading!
If you enjoyed this thread and found it useful, please follow us (@linuxopsys) for more Linux, sysadmin, and devops content!.
Make sure to include some more Linux shells you know about; I'd love to know them as well.
If you enjoyed this thread and found it useful, please follow us (@linuxopsys) for more Linux, sysadmin, and devops content!.
Make sure to include some more Linux shells you know about; I'd love to know them as well.
Loading suggestions...