LoginSignup
0
1

More than 1 year has passed since last update.

homebrewのパスを通す

Last updated at Posted at 2018-12-21

使用状況 -v
* monterey 12.0.1 intel
デフォルトのパスが変わったのね...


デフォルトシェルのチェック

echo $SHELL
  • ~/zshの場合:.zshrc
  • ~/bashの場合:.bash_profile

bashrcとzsh、bash_profileがあるか確認

ls -al

bashrcとzshrc、bash_profile作成

$ touch .bashrc
$ touch .bash_profile
$ touch .zshrc

.bashrc に以下のパスを追加

export PATH="/usr/local/bin:$PATH"

.bash_profileに書き込み

if [ -f ~/.bashrc ] ; then
. ~/.bashrc
fi

パスを通す

$ source ~/.bashrc
$ source ~/.bash_profile
$ source ~/.zshrc

memo

反省点
パスを通すのを直ぐに忘れてしまう...


0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1