Launch Jupyter with Just “jn” from command line : A Quick Setup
Stop typing jupyter notebook
from terminal/command prompt.
Here’s how to launch it with just an alias jn
.
Step 1: Create the Launch Script
Open a vim editor
Paste this:
#!/bin/bash
echo "Starting Jupyter Notebook from Command Line................................................"
jupyter notebook
save the file as jupyter_notebook.sh
Step 2: Create a bin
Folder and Move the Script
Note : It is a good practice to create all your custom scripts under $HOME/bin directory
- Open your terminal.
- Run:
mkdir -p $HOME/bin
- Move your script (adjust the path if needed):
mv jupyter_notebook.sh $HOME/bin/
Step 3: Add bin
to PATH and Create the jn
Shortcut
- Open your shell’s configuration file (based on your environment):
vim ~/.zshrc
(for Zsh)vim ~/.bashrc
(for Bash)nano ~/.bash_profile
(for other Bash setups)
- Add these lines at the end:
export PATH="$HOME/bin:$PATH"
alias jn="$HOME/bin/jupyter_notebook.sh"
- Save and close the file (in
vim: wq!
thenEnter
).
Step 4: Apply the Changes
- Run the
source
command for the file you edited:- For Zsh:
source ~/.zshrc
- For Bash:
source ~/.bashrc
orsource ~/.bash_profile
- For Zsh:
Step 5: Launch with jn
- Open a new terminal.
- Type
jn
and press Enter.
Enjoy your faster Jupyter launch!

Leave a Reply