因为丢失文件导致的
1、.bash_profile
2、.bashrc
#!/usr/bin/env bash__main() {if [[ "$(grep -v '^$' </root/.bash_profile 2>/dev/null | grep -v '^export' | grep -v '^#' | grep -v '^PATH')" == "" ]]; thencat >/root/.bash_profile <<"EOF"# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHEOFfiif [[ "$(grep -v '^$' </root/.bashrc 2>/dev/null | grep -v '^export' | grep -v '^#' | grep -v '^PATH')" == "" ]]; thencat >/root/.bashrc <<"EOF"# .bashrc# User specific aliases and functionsalias rm='rm -i'alias cp='cp -i'alias mv='mv -i'# Source global definitionsif [ -f /etc/bashrc ]; then. /etc/bashrcfiEOFfi}__main
设置好以后重新连接到终端即可
