9
2

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 5 years have passed since last update.

Jupyter Notebookをコマンドラインから一瞬でも早く起動させたいがためのメモ

Posted at

この記事の概要

私はMacユーザ、しかもコマンドラインインターフェースを好んで良く使います。しかし仕事柄、データを可視化したりする場合にはJupyter Notebookが便利。そこで、Jupyter Notebookを少しでも早く起動するためのメモをここに残しておきます。

aliasを.bashrcに設定

Macではシェルの設定ファイルをいじることで、エイリアスを設定することができます。実際に設定してみましょう。

ホームディレクトリに移動します。

$ cd

Vimを用いて.bashrc(zshを使用している場合は.zshrcなど)を、以下のように編集します。

# for Jupyter Notebook
alias jn='jupyter notebook'

もし他のコマンドに設定したい場合は上述のjnの部分を好きな文字列に変えてください。
編集した.bashrcファイルを読み込みます。

$ source .zshrc

.bash_profileに.bashrcを読み込むように支持を書く

ターミナルを立ち上げるときに毎回source .bashrcをタイプしていては元の木阿弥です。そこで.bash_profileに以下を追記します。

# read .bashrc
source ~/.bashrc

これで次回からターミナルの起動と同時に.bashrcの内容が反映されるようになります。

Jupyter Notebookを起動

$ jn

で無事にJupyter Notebookを起動できるようになりました。タイピング数が少なくなるだけでQOLが爆上がりします。

9
2
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
9
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?