使用状況 -v
- Mojave 10.14.2
homebrewインストール
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
bashrcとbash_profileがあるか確認
ls -al
bashrcとbash_profile作成
$ touch .bashrc
$ touch .bash_profile
.bashrcに書き込み
export PATH="/usr/local/bin:$PATH"
.bash_profileに書き込み
if [ -f ~/.bashrc ] ; then
. ~/.bashrc
fi
パスを通す
$ source ~/.bashrc
$ source ~/.bash_profile
反省点 bashrcにパスを通すのを直ぐに忘れてしまう...
参考にさせて頂いたサイト:ありがとうございます。
- [.bash_profileと.bashrcなんて使い分けなくてよかったんや!] (https://qiita.com/dark-space/items/cf25001f89c41341a9fd)
- [Macターミナルの初期設定では~/.bash_profileと~/.bashrcはない?] (https://it-ojisan.tokyo/mac-bash/)