set
Read and write variables
List all enviroment variables
Abort on nonzero exitstatus
abort on unbound variable
Don't hide errors within pipes
Disable all history from bash_history and "history" command
Add below to /etc/profile
vim ~/.bashrc
set +o history
export HISTFILE=/dev/null
export HISTSIZE=0
export HISTFILESIZE=0
source ~/.bashrc
Show all available commands that is being used when using a shell command
Exit immediately if a pipeline returns a non-zero status
Trap ERR from shell functions, command substitutions, and commands from subshell
Treat unset variables as an error
Pipe will exit with last non-zero status, if applicable
Shorthand for above (pipefail has no short option)
Save bash history permanent
##### Bash History Configuration #####
HISTFILE="$HOME/.bash_history"
HISTSIZE=1000000
HISTFILESIZE=2000000
HISTTIMEFORMAT='%F %T - '
shopt -s histappend
# Save and reload history after every command
PROMPT_COMMAND='history -a; history -n'
# Optional controls
HISTCONTROL=ignoreboth
HISTIGNORE='ls:cd:pwd:exit:clear'