Skip to the content.

Running Bash in a Jupyter Notebook on TACC Vista

The easiest install of the set, and arguably the most useful for teaching. No kernelspec patching, no environment variables, no gotchas.

Install

unset PYTHONPATH
source $WORK/miniforge3/etc/profile.d/conda.sh

conda create -y -n kbash -c conda-forge python bash_kernel
conda activate kbash
python -m bash_kernel.install --user

--user writes straight to ~/.local/share/jupyter/kernels/bash/ with an absolute interpreter path, so it works from any node with no further edits. Restart the Jupyter session and Bash appears in the picker.

Why bother, when there is a terminal

For beginners, the terminal is the barrier, not the concepts. A notebook lets you teach Linux and Slurm the same way you teach Python: narrative markdown between cells, output preserved, the whole session saved and re-runnable.

Practical wins:

Reasonable material for it: module spider, module load, navigating $HOME / $WORK / $SCRATCH, checking quotas, squeue, sbatch, sacct, reading a job script, inspecting output files.

What it cannot do

Each cell runs in a persistent shell session, which covers most of what you want, but:

Verifying

hostname
module list
squeue -u $USER