Bash
误删了.bashrc
导致终端都是显示 bash-5.1$
解决办法[1]
创建误删.bashrc文件:
nano ~/.bashrc
文件内容:
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
使其生效:
source ~/.bashrc
创建.bash_profile文件
nano ~/.bash_profile
文件内容:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
使其生效:
source ~/.bash_profile