bash ======== Unix shell bash の基本 -------- {{TOC 3-}} ### bash 設定ファイルの読み込み順 ~/ を覗くと、bash に関連するいくつかの設定ファイルがあります。 * .bash_profile * .bashrc * .bash_history * .bash_logout /etc/ にも bash の設定ファイルは存在します。 * /etc/bashrc * /etc/profile * /etc/profile.d/* これらのファイルは以下のような順で自動的に読み込まれます。 1. /etc/profile → /etc/profile.d/* 1. /etc/bashrc 1. ~/bash_profile → ~/.bashrc(内部で /etc/bashrc を読む) * .bash_profileは基本的にログインしたときだけ読み込まれます * アカウントごとの設定は .bashrc に書いておきます ### bash スクリプト