Invoking the Shell

The command interpreter for bash can be invoked as follows:

bash [options] [arguments]

bash can execute commands from a terminal (when -i is specified), from a file (when the first argument is an executable script), or from standard input (if no arguments remain or if -s is specified).

Options

Options that appear here with double hyphens also work when entered with single hyphens, but the double-hyphen versions are recommended because they are standard.

The remaining options to bash are listed under the set built-in command.

Arguments

Arguments are assigned, in order, to the positional parameters $1, $2, and so forth. If the first argument is an executable script, commands are read from it and remaining arguments are assigned to $1, $2, and so on.