What is Shells?
Shells, also called command line interfaces, are text-based programs that allow users to access, control, and modify the underlying operating system. They accept textual commands from users, interpret them, execute appropriate actions, and display textual output in return.
Some of the most popular and widely used shells are:
- Bash - The Bourne Again SHell, and default shell in most Linux distributions
- Zsh - Powerful alternative shell, offers many improvements over bash
- Fish - User-friendly shell focused on interactive use, with auto-suggestions and syntax highlighting
- Csh/Tcsh - C shell, one of the early and historical Unix shells
Key abilities provided by shells include:
- File system access - navigate directories, list, create, modify, copy, and delete files/folders
- Process control - launch programs, view running processes, stop/kill processes
- Command parsing and execution - run commands provided by the system and third-party programs
- Customization - customize the prompt, aliases, functions, and environment variables
- Scripting - write shell scripts to automate repetitive tasks
- Piping and redirection - chain programs and redirect input/output
Shells provide a simple yet powerful way of controlling the system and leveraging its tools. With scripting, shells can be used to automate complex workflows without programming. Their prevalence stems from providing fast, interactive access in a text terminal.