Created
November 18, 2012 08:44
Revisions
-
disktnk revised this gist
Nov 18, 2012 . No changes.There are no files selected for viewing
-
disktnk renamed this gist
Nov 18, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
disktnk created this gist
Nov 18, 2012 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ Application > Terminalを起動したとき,環境変数の追加その他もろもろを自動でやってほしいとき,.bashrcを編集すればよい. 初期状態では,ホームディレクトリに.bashrcファイルはないので,自分で作成する. ```shell cd ~ vi .bashrc ``` 例えば`PATH`に何かを追加したいときは,以下を足して保存. ```shell export PATH=$PATH:/usr/sample/something1 export PATH=$PATH:/usr/sample/something2 ``` でもこれだけだとだめで,.bash_profileファイルに以下のコードも必要.この.bash_profileファイルも初期状態ではホームディレクトリには無いので,新規作成. ```shell if [ -f ~/.bashrc ]; then . ~/.bashrc fi ``` これで,次にTerminalを起動したときは,.bashrcの内容が実行される.