whatis shell
Shell
Also known as: command-line interpreter
The program that reads the commands you type, expands variables and wildcards, and launches other programs. Bash, zsh, and fish are shells.
What Is a Shell in Linux?
The shell sits between you and the kernel. It parses your input, expands $VARIABLES, * globs, and ~, sets up pipes and redirection, and then starts the requested programs as child processes. It is also a full programming language for scripts.
The shell is not the same thing as the terminal. The terminal emulator is the window that displays text; the shell is the program running inside it. Your login shell is stored in /etc/passwd and printed by echo $SHELL.
Example
echo $SHELL
# /bin/bash Learn more about Shell
- Zsh vs Bash vs Fish: Choosing an Interactive Shell Bash is everywhere and scripts run on it. Zsh has the best completion. Fish is the most pleasant out of the box and is not POSIX compatible. Here is what that actually costs.
- Writing Your First Bash Script A practical introduction to Bash scripting: the shebang line, variables, arguments, conditionals, loops, and functions, with runnable examples you can adapt for real automation tasks.
- bashrc vs bash_profile vs profile: Which File to Put Things In Login shells read one set of files, interactive shells read another, and non-interactive shells read almost nothing. That is why your PATH works in a terminal and not in cron, and why your alias vanishes over ssh.