.bashrc文件在您的主目录中。
所以从命令行做:
cd
ls -a
这将显示您的主目录中的所有隐藏文件。 “cd”会让你回家,ls -a会“列出所有”。
一般当你看到〜/ tilda斜杠是指你的主目录。所以〜/ .bashrc是你的主目录下的.bashrc文件。
而homebrew的标准路径在/ usr / local /,所以如果你:
cd /usr/local
ls | grep -i homebrew
你应该看到homebrew目录(/usr/local/homebrew)。 Source
有时您可能需要创建此文件,.bashrc文件的典型格式为:
# .bashrc
# User specific aliases and functions
. .alias
alias ducks='du -cks * | sort -rn | head -15'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH=$PATH:/home/username/bin:/usr/local/homebrew
export PATH
如果您创建自己的.bashrc文件,请确保以下行在您的〜/ .bash_profile中
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi