The Shell#
Table of Contents#
Sections#
Intro#
cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
/usr/local/bin/pwsh
All shells have startup files containing commands which are executed as soon as the shell starts.
The shell is there to take a list of commands and run them; it doesn’t care whether the commands are in a file or typed at the terminal. When you type a command and wait for it to run before typing another, the shell is interactive. When the shell reads commands from a file, the shell is non-interactive. A shell is interactive if it has a prompt. A list of commands in a file is called a script (as if the shell were acting in a play when it reads from it). The interactive shell waits in the background for a non-interactive copy to read a script.
Builtins and functions run as a part of the shell itself and are therefore more efficient than things like external commands (that don’t run in the shell and which can’t affect its parameters, functions, aliases, etc.).