.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