Skip to main content
3 of 4
Shell Options dictate how the shell application behaves and responds to the user commands.
Vlastimil Burián
  • 31.1k
  • 66
  • 208
  • 356

How can I list bash'es options for the current shell?

The bash intepreter itself has options, i.e.

Lines 22-23 of bash's man page:

OPTIONS  
All of the  single-character shell options documented in the description of the set builtin command can be used as options when the shell is invoked.   In addition, bash interprets the following options when it is invoked:  
-c ...  
-i ...  
-l ...  
-r ...  

I've used a few search patterns in bash man page like:

  • /^\s*set
  • /list

Is it possible to print a list of these settings that are applied to the current shell?

the_velour_fog
  • 12.8k
  • 17
  • 73
  • 115