0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Macのターミナルで~/.bash_profileと~/.bashrcが読み込まれない

Posted at

備忘用にメモ

原因

Macの環境変数を追加しようと思い、
~/.bash_profileと~/.bashrcを編集したが、ターミナル起動時に読み込まれない。。。
sorceコマンドで読み込んだら行ける。

% echo $SHELL
/bin/zsh

。。。。bashじゃないんかい

どうやらmacOS Catalina 以降はzshになっているらしい。

解決法

zsh版ののbash_profileとbashrcは以下の通り。
~/.zprofile
~/.zshrc

自分の場合、すでに作成されていたのでそこに追記すると読み込まれるようになった。

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?