![Forrest logo](/images/logo.png)
On this page you find all important commands for the CLI tool shopt. If the
command you are looking for is missing please ask our AI.
shopt
shopt
is a command line tool used in Unix-like systems like Linux to manipulate shell options.- It allows users to view and modify various settings and behaviors of the shell.
- To see the current shell options, you can simply use the
shopt
command without any arguments. shopt -s
followed by an option name enables the specified shell option.shopt -u
followed by an option name disables the specified shell option.- Some commonly used shell options include
extglob
,nullglob
,globstar
,nocaseglob
,nocasematch
, andhistappend
. - The
extglob
option enables extended globbing patterns that provide additional matching abilities. - The
nullglob
option allows pattern-based matches to expand to nothing if there are no matches. - The
globstar
option enables recursive matching using the**
pattern, useful for recursive file searches. - The
histappend
option appends commands to the history file instead of overwriting it, preserving command history across shell sessions.
List of commands for shopt:
-
shopt:tldr:a4285 shopt: Set an option.$ shopt -s ${option_name}try on your machineexplain this command
-
shopt:tldr:beae9 shopt: Print a list of all options and their status formatted as runnable `shopt` commands.$ shopt -ptry on your machineexplain this command
-
shopt:tldr:c866b shopt: Unset an option.$ shopt -u ${option_name}try on your machineexplain this command
-
shopt:tldr:f0639 shopt: List of all settable options and whether they are set.$ shopttry on your machineexplain this command