cd, pwd | Change or print the working directory; -L, -P |
export, unset | Export variables or functions (export -f); remove variables or functions (unset -v, -f) |
declare, typeset, local, readonly | Set variable scope and attributes; arrays -a / -A, integers -i, readonly -r, export -x |
set | Set positional arguments and options such as -e, -u, -x, -f, -C, and -o pipefail |
shopt | Set, unset, print, or query options with -s, -u, -p, -q; -o selects set options |
alias, unalias | Define or remove aliases; enable expansion with shopt -s expand_aliases |
read | Read into variables; -r, -a ARRAY, -d CHAR, -n N, -N N, -u FD |
mapfile, readarray | Read into an array; -t, -d CHAR, -n N, -s N, -O INDEX, -u FD, -C CALLBACK, -c N |
echo, printf | Print text or formatted values; echo -n/-e/-E, printf -v NAME |
source, ., eval | Run a file or command string in the current session |
bash, sh | Run a script, -c COMMAND, or stdin with -s in a fresh shell environment |
exec | Replace the current shell command flow, or keep descriptor redirections; -c clears the command’s environment |
getopts, shift, let | Parse script options, shift positional arguments, or evaluate integer expressions |
trap | Run actions on EXIT, ERR, and RETURN |
umask | Read or set the creation mask; -S prints symbolic form |
command, type, which | Run or locate a command; command -v/-V, type -t/-a/-p/-P |
true, false, : | Return success or failure; : is a no-op |
exit | End the current shell with an optional exit status |
history | Read or manage command history; -c, -d, -s, -p, -a, -r, -w, -n |
man | Show command help, including registered CLI subcommands: man ls, man linear issue create |