Options
If both single- and multi-character options appear on the command line, the multi-character options must appear first.
- -, --
End option processing.
- -c str
Read commands from string str.
- -D, --dump-strings
Print all $”...” strings in the program.
- --debugger
Read the debugging profile at startup, turn on the extdebug option to shopt, and enable function tracing. For use by the Bash debugger.
- --dump-po-strings
Same as -D, but output in GNU gettext po (portable object) format.
- --help
Print a usage message and exit successfully
- -i
Create an interactive shell (prompt for input).
- --init-file file, --rcfile file
Use file as the startup file instead of ~/.bashrc for interactive shells.
- --login
Shell is a login shell.
- --noediting
Do not use the readline library for input, even in an interactive shell.
- --noprofile
Do not read /etc/profile or any of the personal startup files.
- --norc
Do not read ~/.bashrc. Enabled automatically when invoked as sh.
- -O option
Enable the shopt built-in command option option.
- -p
Start up as a privileged user. Don’t read $ENV or $BASH_ENV, don’t import functions from the environment, and ignore the value of $SHELLOPTS.
- --posix
Turn on POSIX mode.
- -r, --restricted
Create a restricted shell.
- -s
Read commands from standard input; output from built-in commands goes to file descriptor 1 (standard output); all other shell output goes to file descriptor 2 (standard error).
- --verbose
Same as set -v; the shell prints lines as it reads them.
- --version
Print a version message and exit.
The remaining options ...
Get Linux in a Nutshell, 6th Edition 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.