vim ~/.bashrc
然后改成这样:
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
#上面是centos中原来的内容,下面是新加的(Ubuntu中有下面的内容,去掉一行注释就行,具体我也不知道啥道理,只是试了可以用)