$linuxjunkies
>

shell

also: command-line interpreter, CLI interpreter, bash, sh

A shell is a command-line interpreter that reads user input, executes commands, and returns output. It acts as the interface between you and the Linux kernel.

The shell is a program that interprets commands you type at the terminal and communicates with the kernel to execute them. It provides features like command history, tab completion, pipes, and redirection. The shell also includes a scripting language for automating tasks.

Common shells include bash (Bourne Again Shell, the default on most Linux systems), sh (original Bourne shell), zsh, and fish. Each has slightly different syntax and features, but all serve the same core purpose.

Example: When you type ls -la /home, the shell parses this input, locates the ls program, passes the arguments, and displays the results. You can also chain commands with pipes: cat file.txt | grep 'search term' | wc -l.

Related terms