9.12. Bash Options

9.12.1. Shell Invocation Options

When the shell is started using the bash command, it can take options to modify its behavior. There are two types of options: single-character options and multicharacter options. The single-character options consist of a single leading dash followed by a single character. The multicharacter options consist of two leading dashes and any number of characters. Multicharacter options must appear before single-character options. An interactive login shell normally starts up with -i (start an interactive shell), -s (read from standard input), and -m (enable job control). See Table 9.8 on page 475.

Table 9.8. Bash 2.x Shell Invocation Options
OptionMeaning
-c stringCommands are read from string. Any ...

Get Linux Shells by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.