nas-ubuntu 18.04history数量设置及自动补全
编辑.bashrc 中的HISTORYSIZE和HISTORYFILESIZE设置历史命令数量
sudo apt install vi 解决vi便捷时上下箭头乱码问题
tab命令自动补全
sudo vi /etc/bash.bashrc 反注释成这样
# enable bash completion in interactive shells if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi
命令行自动历史补全(上下导航键) sudo vi /etc/inputrc 反注释成这样
# alternate mappings for "page up" and "page down" to search the history "\e[A": history-search-backward "\e[B": history-search-forward
sudo vi /etc/profile
修改history数量,增加
HISTSIZE=10000
发表评论