A mettre dans son ~/.bashrc :
# ==== HISTORIQUE BASH OPTIMISÉ ====
# Date et heure
export HISTTIMEFORMAT= »%F %T »# Taille (très large)
export HISTSIZE=500000
export HISTFILESIZE=1000000# Pas de doublons ni lignes vides
export HISTCONTROL=ignoreboth:erasedups# Commandes inutiles ignorées
export HISTIGNORE= »ls:ll:la:pwd:cd:cd -:exit:clear »# Historique partagé entre terminaux
shopt -s histappend
PROMPT_COMMAND= »history -a; history -c; history -r »
Pour une prise en compte immediate:
source ~/.bashrc