起動時に自動的に実行させるには
~/.ipython/profile_default/ipython_config.pyの設定を変更します.
もしこのファイルがない場合は,shellで以下のコマンドで作成します.
ipython profile create
~/.ipython/profile_default/ipython_config.pyのc.InteractiveShellApp.exec_lines = [...]に実行したい処理をを追加します.
僕のipython_config.pyファイルはこんな感じです.