bash — the command shell
cheat sheet · Ubuntu 24.04; Bash 5.2.21 https://lab.dimsanych.ru/en/wiki/bash/Cheat sheet
-
bash --versionshell version -
helpbuiltin help -
type pwdcommand type -
help pwdcommand help -
set -oshell options -
historysession history
Options
Distinguish bash invocation options from set options and shopt settings: these are
separate interfaces, not one flat option list. bash script.sh runs a script in
another shell. source script.sh runs it in the current one and can change its
variables or directory.
Use set -o to inspect shell options and shopt to inspect additional settings.
These diagnostic invocations do not change the mode. Before copying settings from
an example, identify which shell should receive them.