vi ~/.bashrc
HISTFILESIZE=400000000HISTSIZE=10000export HISTSIZE
shopt -s histappend
bash
然后运行就有历史命令了