.bashrc文件位于您的主目录中。
所以从从命令行执行:
cd
ls -a
这将显示在您的家目录中的所有隐藏文件。 “cd”会让你回家,而ls -a会“全部列出”。
一般来说,当你看到〜/ tilda斜杠指的是你的主目录。所以〜/ .bashrc是你的主目录和.bashrc文件。
并以自制的标准路径是在/ usr/local /下,如果您:
cd /usr/local
ls | grep -i homebrew
你应该看到的自制软件目录(在/ usr /本地/自制)。 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
'find/-name \ * bashrc \ *'。另外,它会告诉你究竟在哪里:'〜/ .bashrc',其中'〜'是Unix用户的主目录的简写。 –
在'〜/ .bashrc'中。 '〜'是你的homedir的缩写,shell可以理解。 –
如果你的homedir中没有'.bashrc',你必须自己创建它:) – furas