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 1 year has passed since last update.

bashについて(備忘録)

Last updated at Posted at 2023-03-18

bash(Bourne Again Shelln)とは

  • シェルの種類の一つ
  • Unix系のシステムで用いられるシェルのこと
  • Macや Windowsにも幅広く普及しているシェル

シェル(Shell)とは

  • ユーザーとコンピュータの橋渡しをするプログラム

bashrcとは

  • bashを起動したときに読み込まれる設定ファイル
  • シェルに必要な設定を書く場所
  • 具体的にはよく使うコマンドの短縮形を登録するエイリアスなどを設定できる

bash_profileとは

  • ログインシェルがbashの状態でログインしたときに読み込まれる設定ファイル
  • 実行される順番としてはbash_profile、bashrcとなる
  • 環境変数1を書く場所

※追記

ログインした際にファイルが実行される順番はこちら
1 /etc/profile
2 ~/.bash_profile
3 ~/.bash_login
4 ~/.profile
5 ~/.bashrc

今まで、なんとなくbash_profileを使っていましたが、新しいパソコンを購入し、homebrewを入れた際にPATHが~/.profileに入力されたので大丈夫かなと思って調べました〜

  1.  環境変数
    その変数を定義したシェル上、およびそのシェルで実行されるプログラムすべてで有効な変数のこと

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?