/root下有一些隐藏的配置文件被删,需要恢复才能解决:
~/.bashrc
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
alias l.='ls -d .* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --co
~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
恢复这两个配置文件后source一下:
source ~/.bashrc
source ~/.bash_profile
问题解决,
当然,主要是/etc/bashrc配置文件还在,只要关联上就可以了。